//公共底部随屏
var GP = new Array('安徽', '北京', '重庆', '福建', '广西', '贵州', '广东', '甘肃', '海南', '湖北', '黑龙江', '河南', '河北', '湖南', '江苏', '吉林', '江西', '辽宁', '内蒙古', '宁夏', '澳门', '青海', '四川', '陕西', '上海', '山东', '山西', '台湾', '天津', '西藏', '香港', '新疆', '云南', '浙江');
var GP_EN = new Array('A 安徽', 'B 北京', 'C 重庆', 'F 福建', 'G 广西', 'G 贵州', 'G 广东', 'G 甘肃', 'H 海南', 'H 湖北', 'H 黑龙江', 'H 河南', 'H 河北', 'H 湖南', 'J 江苏', 'J 吉林', 'J 江西', 'L 辽宁', 'N 内蒙古', 'N 宁夏', 'O 澳门', 'Q 青海', 'S 四川', 'S 陕西', 'S 上海', 'S 山东', 'S 山西', 'T 台湾', 'T 天津', 'X 西藏', 'X 香港', 'X 新疆', 'Y 云南', 'Z 浙江');
var GC1 = new Array();
GC1['安徽'] = new Array('阜阳', '合肥', '芜湖', '蚌埠', '淮南', '马鞍山', '淮北', '铜陵', '安庆', '黄山', '滁州', '宿州', '巢湖', '六安', '亳州', '池州', '宣城');
GC1['北京'] = new Array('北京');
GC1['重庆'] = new Array('重庆');
GC1['福建'] = new Array('福州', '厦门', '三明', '莆田', '泉州', '漳州', '南平', '龙岩', '宁德');
GC1['广西'] = new Array('百色', '南宁', '柳州', '桂林', '梧州', '北海', '防城港', '钦州', '贵港', '玉林', '贺州', '河池', '来宾', '崇左');
GC1['贵州'] = new Array('黔东南苗族侗族自治州', '贵阳', '六盘水', '遵义', '安顺', '铜仁', '毕节', '黔西南布依族苗族自治州', '黔南布依族苗族自治州');
GC1['广东'] = new Array('云浮', '广州', '深圳', '珠海', '汕头', '韶关', '河源', '梅州', '惠州', '汕尾', '东莞', '中山', '江门', '佛山', '阳江', '湛江', '茂名', '肇庆', '清远', '潮州', '揭阳');
GC1['甘肃'] = new Array('甘南藏族自治州', '兰州', '金昌', '白银', '天水', '嘉峪关', '武威', '张掖', '平凉', '酒泉', '庆阳', '定西', '陇南', '临夏回族自治州');
GC1['海南'] = new Array('保亭黎族苗族自治县', '南沙群岛', '西沙群岛', '中沙群岛的岛礁及其海域', '海口', '三亚', '五指山', '琼海', '儋州', '文昌', '万宁', '东方', '澄迈县', '定安县', '屯昌县', '临高县', '白沙黎族自治县', '昌江黎族自治县', '乐东黎族自治县', '陵水黎族自治县', '琼中黎族苗族自治县');
GC1['湖北'] = new Array('武汉', '黄石', '襄阳', '十堰', '荆州', '宜昌', '荆门', '鄂州', '孝感', '黄冈', '咸宁', '随州', '仙桃', '天门', '潜江', '神农架林区', '恩施土家族苗族自治州');
GC1['黑龙江'] = new Array('哈尔滨', '齐齐哈尔', '鹤岗', '双鸭山', '鸡西', '大庆', '伊春', '牡丹江', '佳木斯', '七台河', '黑河', '绥化', '大兴安岭');
GC1['河南'] = new Array('郑州', '鹤壁', '开封', '洛阳', '平顶山', '焦作', '新乡', '安阳', '濮阳', '许昌', '漯河', '三门峡', '南阳', '商丘', '信阳', '周口', '驻马店');
GC1['河北'] = new Array('石家庄', '唐山', '秦皇岛', '邯郸', '邢台', '保定', '张家口', '承德', '沧州', '廊坊', '衡水');
GC1['湖南'] = new Array('长沙', '株洲', '湘潭', '衡阳', '邵阳', '岳阳', '常德', '张家界', '益阳', '郴州', '永州', '怀化', '娄底', '湘西土家族苗族自治州');
GC1['江苏'] = new Array('南京', '徐州', '连云港', '淮安', '宿迁', '盐城', '扬州', '泰州', '南通', '镇江', '常州', '无锡', '苏州', '昆山', '江阴', '常熟');
GC1['吉林'] = new Array('长春', '吉林', '四平', '辽源', '通化', '白山', '松原', '白城', '延边朝鲜族自治州');
GC1['江西'] = new Array('南昌', '景德镇', '萍乡', '新余', '九江', '鹰潭', '赣州', '吉安', '宜春', '抚州', '上饶');
GC1['辽宁'] = new Array('本溪', '沈阳', '大连', '鞍山', '抚顺', '丹东', '锦州', '葫芦岛', '营口', '盘锦', '阜新', '辽阳', '铁岭', '朝阳');
GC1['内蒙古'] = new Array('乌兰察布', '锡林郭勒盟', '巴彦淖尔', '阿拉善盟', '兴安盟', '呼和浩特', '包头', '乌海', '赤峰', '通辽', '鄂尔多斯', '呼伦贝尔');
GC1['宁夏'] = new Array('银川', '石嘴山', '吴忠', '中卫', '固原');
GC1['澳门'] = new Array('澳门');
GC1['青海'] = new Array('西宁', '海东', '海北藏族自治州', '黄南藏族自治州', '海南藏族自治州', '果洛藏族自治州', '玉树藏族自治州', '海西蒙古族藏族自治州');
GC1['四川'] = new Array('成都', '自贡', '攀枝花', '泸州', '德阳', '绵阳', '广元', '遂宁', '内江', '乐山', '南充', '宜宾', '广安', '达州', '巴中', '眉山', '资阳', '阿坝藏族羌族自治州', '甘孜藏族自治州', '凉山彝族自治州', '雅安');
GC1['陕西'] = new Array('西安', '铜川', '宝鸡', '咸阳', '渭南', '延安', '汉中', '榆林', '安康', '商洛');
GC1['上海'] = new Array('上海');
GC1['山东'] = new Array('聊城', '滨州', '菏泽', '潍坊', '日照', '济南', '青岛', '淄博', '枣庄', '东营', '烟台', '威海', '济宁', '泰安', '莱芜', '德州', '临沂');
GC1['山西'] = new Array('太原', '大同', '阳泉', '长治', '晋城', '朔州', '晋中', '忻州', '临汾', '运城', '吕梁');
GC1['台湾'] = new Array('台湾');
GC1['天津'] = new Array('天津');
GC1['西藏'] = new Array('拉萨', '那曲', '昌都', '山南', '日喀则', '阿里', '林芝');
GC1['香港'] = new Array('香港');
GC1['新疆'] = new Array('乌鲁木齐', '克拉玛依', '石河子', '阿拉尔', '图木舒克', '五家渠', '吐鲁番', '哈密', '和田', '阿克苏', '克孜勒苏柯尔克孜自治州', '巴音郭楞蒙古自治州', '昌吉回族自治州', '博尔塔拉蒙古自治州', '伊犁哈萨克自治州', '喀什', '阿勒泰地区', '塔城地区');
GC1['云南'] = new Array('昆明', '曲靖', '玉溪', '保山', '昭通', '普洱', '临沧', '丽江', '文山壮族苗族自治州', '红河哈尼族彝族自治州', '西双版纳傣族自治州', '楚雄彝族自治州', '大理白族自治州', '德宏傣族景颇族自治州', '怒江傈傈族自治州', '迪庆藏族自治州');
GC1['浙江'] = new Array('宁波', '温州', '嘉兴', '湖州', '绍兴', '金华', '舟山', '台州', '丽水', '杭州', '衢州', '义乌');
/**********************************************************************jQuery v1.11.3*********************************************************************************************/
/*! jQuery v1.11.3 | (c) 2005, 2015 jQuery Foundation, Inc. | jquery.org/license */
!function(a,b){"object"==typeof module&&"object"==typeof module.exports?module.exports=a.document?b(a,!0):function(a){if(!a.document)throw new Error("jQuery requires a window with a document");return b(a)}:b(a)}("undefined"!=typeof window?window:this,function(a,b){var c=[],d=c.slice,e=c.concat,f=c.push,g=c.indexOf,h={},i=h.toString,j=h.hasOwnProperty,k={},l="1.11.3",m=function(a,b){return new m.fn.init(a,b)},n=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,o=/^-ms-/,p=/-([\da-z])/gi,q=function(a,b){return b.toUpperCase()};m.fn=m.prototype={jquery:l,constructor:m,selector:"",length:0,toArray:function(){return d.call(this)},get:function(a){return null!=a?0>a?this[a+this.length]:this[a]:d.call(this)},pushStack:function(a){var b=m.merge(this.constructor(),a);return b.prevObject=this,b.context=this.context,b},each:function(a,b){return m.each(this,a,b)},map:function(a){return this.pushStack(m.map(this,function(b,c){return a.call(b,c,b)}))},slice:function(){return this.pushStack(d.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(a){var b=this.length,c=+a+(0>a?b:0);return this.pushStack(c>=0&&b>c?[this[c]]:[])},end:function(){return this.prevObject||this.constructor(null)},push:f,sort:c.sort,splice:c.splice},m.extend=m.fn.extend=function(){var a,b,c,d,e,f,g=arguments[0]||{},h=1,i=arguments.length,j=!1;for("boolean"==typeof g&&(j=g,g=arguments[h]||{},h++),"object"==typeof g||m.isFunction(g)||(g={}),h===i&&(g=this,h--);i>h;h++)if(null!=(e=arguments[h]))for(d in e)a=g[d],c=e[d],g!==c&&(j&&c&&(m.isPlainObject(c)||(b=m.isArray(c)))?(b?(b=!1,f=a&&m.isArray(a)?a:[]):f=a&&m.isPlainObject(a)?a:{},g[d]=m.extend(j,f,c)):void 0!==c&&(g[d]=c));return g},m.extend({expando:"jQuery"+(l+Math.random()).replace(/\D/g,""),isReady:!0,error:function(a){throw new Error(a)},noop:function(){},isFunction:function(a){return"function"===m.type(a)},isArray:Array.isArray||function(a){return"array"===m.type(a)},isWindow:function(a){return null!=a&&a==a.window},isNumeric:function(a){return!m.isArray(a)&&a-parseFloat(a)+1>=0},isEmptyObject:function(a){var b;for(b in a)return!1;return!0},isPlainObject:function(a){var b;if(!a||"object"!==m.type(a)||a.nodeType||m.isWindow(a))return!1;try{if(a.constructor&&!j.call(a,"constructor")&&!j.call(a.constructor.prototype,"isPrototypeOf"))return!1}catch(c){return!1}if(k.ownLast)for(b in a)return j.call(a,b);for(b in a);return void 0===b||j.call(a,b)},type:function(a){return null==a?a+"":"object"==typeof a||"function"==typeof a?h[i.call(a)]||"object":typeof a},globalEval:function(b){b&&m.trim(b)&&(a.execScript||function(b){a.eval.call(a,b)})(b)},camelCase:function(a){return a.replace(o,"ms-").replace(p,q)},nodeName:function(a,b){return a.nodeName&&a.nodeName.toLowerCase()===b.toLowerCase()},each:function(a,b,c){var d,e=0,f=a.length,g=r(a);if(c){if(g){for(;f>e;e++)if(d=b.apply(a[e],c),d===!1)break}else for(e in a)if(d=b.apply(a[e],c),d===!1)break}else if(g){for(;f>e;e++)if(d=b.call(a[e],e,a[e]),d===!1)break}else for(e in a)if(d=b.call(a[e],e,a[e]),d===!1)break;return a},trim:function(a){return null==a?"":(a+"").replace(n,"")},makeArray:function(a,b){var c=b||[];return null!=a&&(r(Object(a))?m.merge(c,"string"==typeof a?[a]:a):f.call(c,a)),c},inArray:function(a,b,c){var d;if(b){if(g)return g.call(b,a,c);for(d=b.length,c=c?0>c?Math.max(0,d+c):c:0;d>c;c++)if(c in b&&b[c]===a)return c}return-1},merge:function(a,b){var c=+b.length,d=0,e=a.length;while(c>d)a[e++]=b[d++];if(c!==c)while(void 0!==b[d])a[e++]=b[d++];return a.length=e,a},grep:function(a,b,c){for(var d,e=[],f=0,g=a.length,h=!c;g>f;f++)d=!b(a[f],f),d!==h&&e.push(a[f]);return e},map:function(a,b,c){var d,f=0,g=a.length,h=r(a),i=[];if(h)for(;g>f;f++)d=b(a[f],f,c),null!=d&&i.push(d);else for(f in a)d=b(a[f],f,c),null!=d&&i.push(d);return e.apply([],i)},guid:1,proxy:function(a,b){var c,e,f;return"string"==typeof b&&(f=a[b],b=a,a=f),m.isFunction(a)?(c=d.call(arguments,2),e=function(){return a.apply(b||this,c.concat(d.call(arguments)))},e.guid=a.guid=a.guid||m.guid++,e):void 0},now:function(){return+new Date},support:k}),m.each("Boolean Number String Function Array Date RegExp Object Error".split(" "),function(a,b){h["[object "+b+"]"]=b.toLowerCase()});function r(a){var b="length"in a&&a.length,c=m.type(a);return"function"===c||m.isWindow(a)?!1:1===a.nodeType&&b?!0:"array"===c||0===b||"number"==typeof b&&b>0&&b-1 in a}var s=function(a){var b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u="sizzle"+1*new Date,v=a.document,w=0,x=0,y=ha(),z=ha(),A=ha(),B=function(a,b){return a===b&&(l=!0),0},C=1<<31,D={}.hasOwnProperty,E=[],F=E.pop,G=E.push,H=E.push,I=E.slice,J=function(a,b){for(var c=0,d=a.length;d>c;c++)if(a[c]===b)return c;return-1},K="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",L="[\\x20\\t\\r\\n\\f]",M="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",N=M.replace("w","w#"),O="\\["+L+"*("+M+")(?:"+L+"*([*^$|!~]?=)"+L+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+N+"))|)"+L+"*\\]",P=":("+M+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+O+")*)|.*)\\)|)",Q=new RegExp(L+"+","g"),R=new RegExp("^"+L+"+|((?:^|[^\\\\])(?:\\\\.)*)"+L+"+$","g"),S=new RegExp("^"+L+"*,"+L+"*"),T=new RegExp("^"+L+"*([>+~]|"+L+")"+L+"*"),U=new RegExp("="+L+"*([^\\]'\"]*?)"+L+"*\\]","g"),V=new RegExp(P),W=new RegExp("^"+N+"$"),X={ID:new RegExp("^#("+M+")"),CLASS:new RegExp("^\\.("+M+")"),TAG:new RegExp("^("+M.replace("w","w*")+")"),ATTR:new RegExp("^"+O),PSEUDO:new RegExp("^"+P),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+L+"*(even|odd|(([+-]|)(\\d*)n|)"+L+"*(?:([+-]|)"+L+"*(\\d+)|))"+L+"*\\)|)","i"),bool:new RegExp("^(?:"+K+")$","i"),needsContext:new RegExp("^"+L+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+L+"*((?:-\\d)?\\d*)"+L+"*\\)|)(?=[^-]|$)","i")},Y=/^(?:input|select|textarea|button)$/i,Z=/^h\d$/i,$=/^[^{]+\{\s*\[native \w/,_=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,aa=/[+~]/,ba=/'|\\/g,ca=new RegExp("\\\\([\\da-f]{1,6}"+L+"?|("+L+")|.)","ig"),da=function(a,b,c){var d="0x"+b-65536;return d!==d||c?b:0>d?String.fromCharCode(d+65536):String.fromCharCode(d>>10|55296,1023&d|56320)},ea=function(){m()};try{H.apply(E=I.call(v.childNodes),v.childNodes),E[v.childNodes.length].nodeType}catch(fa){H={apply:E.length?function(a,b){G.apply(a,I.call(b))}:function(a,b){var c=a.length,d=0;while(a[c++]=b[d++]);a.length=c-1}}}function ga(a,b,d,e){var f,h,j,k,l,o,r,s,w,x;if((b?b.ownerDocument||b:v)!==n&&m(b),b=b||n,d=d||[],k=b.nodeType,"string"!=typeof a||!a||1!==k&&9!==k&&11!==k)return d;if(!e&&p){if(11!==k&&(f=_.exec(a)))if(j=f[1]){if(9===k){if(h=b.getElementById(j),!h||!h.parentNode)return d;if(h.id===j)return d.push(h),d}else if(b.ownerDocument&&(h=b.ownerDocument.getElementById(j))&&t(b,h)&&h.id===j)return d.push(h),d}else{if(f[2])return H.apply(d,b.getElementsByTagName(a)),d;if((j=f[3])&&c.getElementsByClassName)return H.apply(d,b.getElementsByClassName(j)),d}if(c.qsa&&(!q||!q.test(a))){if(s=r=u,w=b,x=1!==k&&a,1===k&&"object"!==b.nodeName.toLowerCase()){o=g(a),(r=b.getAttribute("id"))?s=r.replace(ba,"\\$&"):b.setAttribute("id",s),s="[id='"+s+"'] ",l=o.length;while(l--)o[l]=s+ra(o[l]);w=aa.test(a)&&pa(b.parentNode)||b,x=o.join(",")}if(x)try{return H.apply(d,w.querySelectorAll(x)),d}catch(y){}finally{r||b.removeAttribute("id")}}}return i(a.replace(R,"$1"),b,d,e)}function ha(){var a=[];function b(c,e){return a.push(c+" ")>d.cacheLength&&delete b[a.shift()],b[c+" "]=e}return b}function ia(a){return a[u]=!0,a}function ja(a){var b=n.createElement("div");try{return!!a(b)}catch(c){return!1}finally{b.parentNode&&b.parentNode.removeChild(b),b=null}}function ka(a,b){var c=a.split("|"),e=a.length;while(e--)d.attrHandle[c[e]]=b}function la(a,b){var c=b&&a,d=c&&1===a.nodeType&&1===b.nodeType&&(~b.sourceIndex||C)-(~a.sourceIndex||C);if(d)return d;if(c)while(c=c.nextSibling)if(c===b)return-1;return a?1:-1}function ma(a){return function(b){var c=b.nodeName.toLowerCase();return"input"===c&&b.type===a}}function na(a){return function(b){var c=b.nodeName.toLowerCase();return("input"===c||"button"===c)&&b.type===a}}function oa(a){return ia(function(b){return b=+b,ia(function(c,d){var e,f=a([],c.length,b),g=f.length;while(g--)c[e=f[g]]&&(c[e]=!(d[e]=c[e]))})})}function pa(a){return a&&"undefined"!=typeof a.getElementsByTagName&&a}c=ga.support={},f=ga.isXML=function(a){var b=a&&(a.ownerDocument||a).documentElement;return b?"HTML"!==b.nodeName:!1},m=ga.setDocument=function(a){var b,e,g=a?a.ownerDocument||a:v;return g!==n&&9===g.nodeType&&g.documentElement?(n=g,o=g.documentElement,e=g.defaultView,e&&e!==e.top&&(e.addEventListener?e.addEventListener("unload",ea,!1):e.attachEvent&&e.attachEvent("onunload",ea)),p=!f(g),c.attributes=ja(function(a){return a.className="i",!a.getAttribute("className")}),c.getElementsByTagName=ja(function(a){return a.appendChild(g.createComment("")),!a.getElementsByTagName("*").length}),c.getElementsByClassName=$.test(g.getElementsByClassName),c.getById=ja(function(a){return o.appendChild(a).id=u,!g.getElementsByName||!g.getElementsByName(u).length}),c.getById?(d.find.ID=function(a,b){if("undefined"!=typeof b.getElementById&&p){var c=b.getElementById(a);return c&&c.parentNode?[c]:[]}},d.filter.ID=function(a){var b=a.replace(ca,da);return function(a){return a.getAttribute("id")===b}}):(delete d.find.ID,d.filter.ID=function(a){var b=a.replace(ca,da);return function(a){var c="undefined"!=typeof a.getAttributeNode&&a.getAttributeNode("id");return c&&c.value===b}}),d.find.TAG=c.getElementsByTagName?function(a,b){return"undefined"!=typeof b.getElementsByTagName?b.getElementsByTagName(a):c.qsa?b.querySelectorAll(a):void 0}:function(a,b){var c,d=[],e=0,f=b.getElementsByTagName(a);if("*"===a){while(c=f[e++])1===c.nodeType&&d.push(c);return d}return f},d.find.CLASS=c.getElementsByClassName&&function(a,b){return p?b.getElementsByClassName(a):void 0},r=[],q=[],(c.qsa=$.test(g.querySelectorAll))&&(ja(function(a){o.appendChild(a).innerHTML="<a id='"+u+"'></a><select id='"+u+"-\f]' msallowcapture=''><option selected=''></option></select>",a.querySelectorAll("[msallowcapture^='']").length&&q.push("[*^$]="+L+"*(?:''|\"\")"),a.querySelectorAll("[selected]").length||q.push("\\["+L+"*(?:value|"+K+")"),a.querySelectorAll("[id~="+u+"-]").length||q.push("~="),a.querySelectorAll(":checked").length||q.push(":checked"),a.querySelectorAll("a#"+u+"+*").length||q.push(".#.+[+~]")}),ja(function(a){var b=g.createElement("input");b.setAttribute("type","hidden"),a.appendChild(b).setAttribute("name","D"),a.querySelectorAll("[name=d]").length&&q.push("name"+L+"*[*^$|!~]?="),a.querySelectorAll(":enabled").length||q.push(":enabled",":disabled"),a.querySelectorAll("*,:x"),q.push(",.*:")})),(c.matchesSelector=$.test(s=o.matches||o.webkitMatchesSelector||o.mozMatchesSelector||o.oMatchesSelector||o.msMatchesSelector))&&ja(function(a){c.disconnectedMatch=s.call(a,"div"),s.call(a,"[s!='']:x"),r.push("!=",P)}),q=q.length&&new RegExp(q.join("|")),r=r.length&&new RegExp(r.join("|")),b=$.test(o.compareDocumentPosition),t=b||$.test(o.contains)?function(a,b){var c=9===a.nodeType?a.documentElement:a,d=b&&b.parentNode;return a===d||!(!d||1!==d.nodeType||!(c.contains?c.contains(d):a.compareDocumentPosition&&16&a.compareDocumentPosition(d)))}:function(a,b){if(b)while(b=b.parentNode)if(b===a)return!0;return!1},B=b?function(a,b){if(a===b)return l=!0,0;var d=!a.compareDocumentPosition-!b.compareDocumentPosition;return d?d:(d=(a.ownerDocument||a)===(b.ownerDocument||b)?a.compareDocumentPosition(b):1,1&d||!c.sortDetached&&b.compareDocumentPosition(a)===d?a===g||a.ownerDocument===v&&t(v,a)?-1:b===g||b.ownerDocument===v&&t(v,b)?1:k?J(k,a)-J(k,b):0:4&d?-1:1)}:function(a,b){if(a===b)return l=!0,0;var c,d=0,e=a.parentNode,f=b.parentNode,h=[a],i=[b];if(!e||!f)return a===g?-1:b===g?1:e?-1:f?1:k?J(k,a)-J(k,b):0;if(e===f)return la(a,b);c=a;while(c=c.parentNode)h.unshift(c);c=b;while(c=c.parentNode)i.unshift(c);while(h[d]===i[d])d++;return d?la(h[d],i[d]):h[d]===v?-1:i[d]===v?1:0},g):n},ga.matches=function(a,b){return ga(a,null,null,b)},ga.matchesSelector=function(a,b){if((a.ownerDocument||a)!==n&&m(a),b=b.replace(U,"='$1']"),!(!c.matchesSelector||!p||r&&r.test(b)||q&&q.test(b)))try{var d=s.call(a,b);if(d||c.disconnectedMatch||a.document&&11!==a.document.nodeType)return d}catch(e){}return ga(b,n,null,[a]).length>0},ga.contains=function(a,b){return(a.ownerDocument||a)!==n&&m(a),t(a,b)},ga.attr=function(a,b){(a.ownerDocument||a)!==n&&m(a);var e=d.attrHandle[b.toLowerCase()],f=e&&D.call(d.attrHandle,b.toLowerCase())?e(a,b,!p):void 0;return void 0!==f?f:c.attributes||!p?a.getAttribute(b):(f=a.getAttributeNode(b))&&f.specified?f.value:null},ga.error=function(a){throw new Error("Syntax error, unrecognized expression: "+a)},ga.uniqueSort=function(a){var b,d=[],e=0,f=0;if(l=!c.detectDuplicates,k=!c.sortStable&&a.slice(0),a.sort(B),l){while(b=a[f++])b===a[f]&&(e=d.push(f));while(e--)a.splice(d[e],1)}return k=null,a},e=ga.getText=function(a){var b,c="",d=0,f=a.nodeType;if(f){if(1===f||9===f||11===f){if("string"==typeof a.textContent)return a.textContent;for(a=a.firstChild;a;a=a.nextSibling)c+=e(a)}else if(3===f||4===f)return a.nodeValue}else while(b=a[d++])c+=e(b);return c},d=ga.selectors={cacheLength:50,createPseudo:ia,match:X,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(a){return a[1]=a[1].replace(ca,da),a[3]=(a[3]||a[4]||a[5]||"").replace(ca,da),"~="===a[2]&&(a[3]=" "+a[3]+" "),a.slice(0,4)},CHILD:function(a){return a[1]=a[1].toLowerCase(),"nth"===a[1].slice(0,3)?(a[3]||ga.error(a[0]),a[4]=+(a[4]?a[5]+(a[6]||1):2*("even"===a[3]||"odd"===a[3])),a[5]=+(a[7]+a[8]||"odd"===a[3])):a[3]&&ga.error(a[0]),a},PSEUDO:function(a){var b,c=!a[6]&&a[2];return X.CHILD.test(a[0])?null:(a[3]?a[2]=a[4]||a[5]||"":c&&V.test(c)&&(b=g(c,!0))&&(b=c.indexOf(")",c.length-b)-c.length)&&(a[0]=a[0].slice(0,b),a[2]=c.slice(0,b)),a.slice(0,3))}},filter:{TAG:function(a){var b=a.replace(ca,da).toLowerCase();return"*"===a?function(){return!0}:function(a){return a.nodeName&&a.nodeName.toLowerCase()===b}},CLASS:function(a){var b=y[a+" "];return b||(b=new RegExp("(^|"+L+")"+a+"("+L+"|$)"))&&y(a,function(a){return b.test("string"==typeof a.className&&a.className||"undefined"!=typeof a.getAttribute&&a.getAttribute("class")||"")})},ATTR:function(a,b,c){return function(d){var e=ga.attr(d,a);return null==e?"!="===b:b?(e+="","="===b?e===c:"!="===b?e!==c:"^="===b?c&&0===e.indexOf(c):"*="===b?c&&e.indexOf(c)>-1:"$="===b?c&&e.slice(-c.length)===c:"~="===b?(" "+e.replace(Q," ")+" ").indexOf(c)>-1:"|="===b?e===c||e.slice(0,c.length+1)===c+"-":!1):!0}},CHILD:function(a,b,c,d,e){var f="nth"!==a.slice(0,3),g="last"!==a.slice(-4),h="of-type"===b;return 1===d&&0===e?function(a){return!!a.parentNode}:function(b,c,i){var j,k,l,m,n,o,p=f!==g?"nextSibling":"previousSibling",q=b.parentNode,r=h&&b.nodeName.toLowerCase(),s=!i&&!h;if(q){if(f){while(p){l=b;while(l=l[p])if(h?l.nodeName.toLowerCase()===r:1===l.nodeType)return!1;o=p="only"===a&&!o&&"nextSibling"}return!0}if(o=[g?q.firstChild:q.lastChild],g&&s){k=q[u]||(q[u]={}),j=k[a]||[],n=j[0]===w&&j[1],m=j[0]===w&&j[2],l=n&&q.childNodes[n];while(l=++n&&l&&l[p]||(m=n=0)||o.pop())if(1===l.nodeType&&++m&&l===b){k[a]=[w,n,m];break}}else if(s&&(j=(b[u]||(b[u]={}))[a])&&j[0]===w)m=j[1];else while(l=++n&&l&&l[p]||(m=n=0)||o.pop())if((h?l.nodeName.toLowerCase()===r:1===l.nodeType)&&++m&&(s&&((l[u]||(l[u]={}))[a]=[w,m]),l===b))break;return m-=e,m===d||m%d===0&&m/d>=0}}},PSEUDO:function(a,b){var c,e=d.pseudos[a]||d.setFilters[a.toLowerCase()]||ga.error("unsupported pseudo: "+a);return e[u]?e(b):e.length>1?(c=[a,a,"",b],d.setFilters.hasOwnProperty(a.toLowerCase())?ia(function(a,c){var d,f=e(a,b),g=f.length;while(g--)d=J(a,f[g]),a[d]=!(c[d]=f[g])}):function(a){return e(a,0,c)}):e}},pseudos:{not:ia(function(a){var b=[],c=[],d=h(a.replace(R,"$1"));return d[u]?ia(function(a,b,c,e){var f,g=d(a,null,e,[]),h=a.length;while(h--)(f=g[h])&&(a[h]=!(b[h]=f))}):function(a,e,f){return b[0]=a,d(b,null,f,c),b[0]=null,!c.pop()}}),has:ia(function(a){return function(b){return ga(a,b).length>0}}),contains:ia(function(a){return a=a.replace(ca,da),function(b){return(b.textContent||b.innerText||e(b)).indexOf(a)>-1}}),lang:ia(function(a){return W.test(a||"")||ga.error("unsupported lang: "+a),a=a.replace(ca,da).toLowerCase(),function(b){var c;do if(c=p?b.lang:b.getAttribute("xml:lang")||b.getAttribute("lang"))return c=c.toLowerCase(),c===a||0===c.indexOf(a+"-");while((b=b.parentNode)&&1===b.nodeType);return!1}}),target:function(b){var c=a.location&&a.location.hash;return c&&c.slice(1)===b.id},root:function(a){return a===o},focus:function(a){return a===n.activeElement&&(!n.hasFocus||n.hasFocus())&&!!(a.type||a.href||~a.tabIndex)},enabled:function(a){return a.disabled===!1},disabled:function(a){return a.disabled===!0},checked:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&!!a.checked||"option"===b&&!!a.selected},selected:function(a){return a.parentNode&&a.parentNode.selectedIndex,a.selected===!0},empty:function(a){for(a=a.firstChild;a;a=a.nextSibling)if(a.nodeType<6)return!1;return!0},parent:function(a){return!d.pseudos.empty(a)},header:function(a){return Z.test(a.nodeName)},input:function(a){return Y.test(a.nodeName)},button:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&"button"===a.type||"button"===b},text:function(a){var b;return"input"===a.nodeName.toLowerCase()&&"text"===a.type&&(null==(b=a.getAttribute("type"))||"text"===b.toLowerCase())},first:oa(function(){return[0]}),last:oa(function(a,b){return[b-1]}),eq:oa(function(a,b,c){return[0>c?c+b:c]}),even:oa(function(a,b){for(var c=0;b>c;c+=2)a.push(c);return a}),odd:oa(function(a,b){for(var c=1;b>c;c+=2)a.push(c);return a}),lt:oa(function(a,b,c){for(var d=0>c?c+b:c;--d>=0;)a.push(d);return a}),gt:oa(function(a,b,c){for(var d=0>c?c+b:c;++d<b;)a.push(d);return a})}},d.pseudos.nth=d.pseudos.eq;for(b in{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})d.pseudos[b]=ma(b);for(b in{submit:!0,reset:!0})d.pseudos[b]=na(b);function qa(){}qa.prototype=d.filters=d.pseudos,d.setFilters=new qa,g=ga.tokenize=function(a,b){var c,e,f,g,h,i,j,k=z[a+" "];if(k)return b?0:k.slice(0);h=a,i=[],j=d.preFilter;while(h){(!c||(e=S.exec(h)))&&(e&&(h=h.slice(e[0].length)||h),i.push(f=[])),c=!1,(e=T.exec(h))&&(c=e.shift(),f.push({value:c,type:e[0].replace(R," ")}),h=h.slice(c.length));for(g in d.filter)!(e=X[g].exec(h))||j[g]&&!(e=j[g](e))||(c=e.shift(),f.push({value:c,type:g,matches:e}),h=h.slice(c.length));if(!c)break}return b?h.length:h?ga.error(a):z(a,i).slice(0)};function ra(a){for(var b=0,c=a.length,d="";c>b;b++)d+=a[b].value;return d}function sa(a,b,c){var d=b.dir,e=c&&"parentNode"===d,f=x++;return b.first?function(b,c,f){while(b=b[d])if(1===b.nodeType||e)return a(b,c,f)}:function(b,c,g){var h,i,j=[w,f];if(g){while(b=b[d])if((1===b.nodeType||e)&&a(b,c,g))return!0}else while(b=b[d])if(1===b.nodeType||e){if(i=b[u]||(b[u]={}),(h=i[d])&&h[0]===w&&h[1]===f)return j[2]=h[2];if(i[d]=j,j[2]=a(b,c,g))return!0}}}function ta(a){return a.length>1?function(b,c,d){var e=a.length;while(e--)if(!a[e](b,c,d))return!1;return!0}:a[0]}function ua(a,b,c){for(var d=0,e=b.length;e>d;d++)ga(a,b[d],c);return c}function va(a,b,c,d,e){for(var f,g=[],h=0,i=a.length,j=null!=b;i>h;h++)(f=a[h])&&(!c||c(f,d,e))&&(g.push(f),j&&b.push(h));return g}function wa(a,b,c,d,e,f){return d&&!d[u]&&(d=wa(d)),e&&!e[u]&&(e=wa(e,f)),ia(function(f,g,h,i){var j,k,l,m=[],n=[],o=g.length,p=f||ua(b||"*",h.nodeType?[h]:h,[]),q=!a||!f&&b?p:va(p,m,a,h,i),r=c?e||(f?a:o||d)?[]:g:q;if(c&&c(q,r,h,i),d){j=va(r,n),d(j,[],h,i),k=j.length;while(k--)(l=j[k])&&(r[n[k]]=!(q[n[k]]=l))}if(f){if(e||a){if(e){j=[],k=r.length;while(k--)(l=r[k])&&j.push(q[k]=l);e(null,r=[],j,i)}k=r.length;while(k--)(l=r[k])&&(j=e?J(f,l):m[k])>-1&&(f[j]=!(g[j]=l))}}else r=va(r===g?r.splice(o,r.length):r),e?e(null,g,r,i):H.apply(g,r)})}function xa(a){for(var b,c,e,f=a.length,g=d.relative[a[0].type],h=g||d.relative[" "],i=g?1:0,k=sa(function(a){return a===b},h,!0),l=sa(function(a){return J(b,a)>-1},h,!0),m=[function(a,c,d){var e=!g&&(d||c!==j)||((b=c).nodeType?k(a,c,d):l(a,c,d));return b=null,e}];f>i;i++)if(c=d.relative[a[i].type])m=[sa(ta(m),c)];else{if(c=d.filter[a[i].type].apply(null,a[i].matches),c[u]){for(e=++i;f>e;e++)if(d.relative[a[e].type])break;return wa(i>1&&ta(m),i>1&&ra(a.slice(0,i-1).concat({value:" "===a[i-2].type?"*":""})).replace(R,"$1"),c,e>i&&xa(a.slice(i,e)),f>e&&xa(a=a.slice(e)),f>e&&ra(a))}m.push(c)}return ta(m)}function ya(a,b){var c=b.length>0,e=a.length>0,f=function(f,g,h,i,k){var l,m,o,p=0,q="0",r=f&&[],s=[],t=j,u=f||e&&d.find.TAG("*",k),v=w+=null==t?1:Math.random()||.1,x=u.length;for(k&&(j=g!==n&&g);q!==x&&null!=(l=u[q]);q++){if(e&&l){m=0;while(o=a[m++])if(o(l,g,h)){i.push(l);break}k&&(w=v)}c&&((l=!o&&l)&&p--,f&&r.push(l))}if(p+=q,c&&q!==p){m=0;while(o=b[m++])o(r,s,g,h);if(f){if(p>0)while(q--)r[q]||s[q]||(s[q]=F.call(i));s=va(s)}H.apply(i,s),k&&!f&&s.length>0&&p+b.length>1&&ga.uniqueSort(i)}return k&&(w=v,j=t),r};return c?ia(f):f}return h=ga.compile=function(a,b){var c,d=[],e=[],f=A[a+" "];if(!f){b||(b=g(a)),c=b.length;while(c--)f=xa(b[c]),f[u]?d.push(f):e.push(f);f=A(a,ya(e,d)),f.selector=a}return f},i=ga.select=function(a,b,e,f){var i,j,k,l,m,n="function"==typeof a&&a,o=!f&&g(a=n.selector||a);if(e=e||[],1===o.length){if(j=o[0]=o[0].slice(0),j.length>2&&"ID"===(k=j[0]).type&&c.getById&&9===b.nodeType&&p&&d.relative[j[1].type]){if(b=(d.find.ID(k.matches[0].replace(ca,da),b)||[])[0],!b)return e;n&&(b=b.parentNode),a=a.slice(j.shift().value.length)}i=X.needsContext.test(a)?0:j.length;while(i--){if(k=j[i],d.relative[l=k.type])break;if((m=d.find[l])&&(f=m(k.matches[0].replace(ca,da),aa.test(j[0].type)&&pa(b.parentNode)||b))){if(j.splice(i,1),a=f.length&&ra(j),!a)return H.apply(e,f),e;break}}}return(n||h(a,o))(f,b,!p,e,aa.test(a)&&pa(b.parentNode)||b),e},c.sortStable=u.split("").sort(B).join("")===u,c.detectDuplicates=!!l,m(),c.sortDetached=ja(function(a){return 1&a.compareDocumentPosition(n.createElement("div"))}),ja(function(a){return a.innerHTML="<a href='#'></a>","#"===a.firstChild.getAttribute("href")})||ka("type|href|height|width",function(a,b,c){return c?void 0:a.getAttribute(b,"type"===b.toLowerCase()?1:2)}),c.attributes&&ja(function(a){return a.innerHTML="<input/>",a.firstChild.setAttribute("value",""),""===a.firstChild.getAttribute("value")})||ka("value",function(a,b,c){return c||"input"!==a.nodeName.toLowerCase()?void 0:a.defaultValue}),ja(function(a){return null==a.getAttribute("disabled")})||ka(K,function(a,b,c){var d;return c?void 0:a[b]===!0?b.toLowerCase():(d=a.getAttributeNode(b))&&d.specified?d.value:null}),ga}(a);m.find=s,m.expr=s.selectors,m.expr[":"]=m.expr.pseudos,m.unique=s.uniqueSort,m.text=s.getText,m.isXMLDoc=s.isXML,m.contains=s.contains;var t=m.expr.match.needsContext,u=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,v=/^.[^:#\[\.,]*$/;function w(a,b,c){if(m.isFunction(b))return m.grep(a,function(a,d){return!!b.call(a,d,a)!==c});if(b.nodeType)return m.grep(a,function(a){return a===b!==c});if("string"==typeof b){if(v.test(b))return m.filter(b,a,c);b=m.filter(b,a)}return m.grep(a,function(a){return m.inArray(a,b)>=0!==c})}m.filter=function(a,b,c){var d=b[0];return c&&(a=":not("+a+")"),1===b.length&&1===d.nodeType?m.find.matchesSelector(d,a)?[d]:[]:m.find.matches(a,m.grep(b,function(a){return 1===a.nodeType}))},m.fn.extend({find:function(a){var b,c=[],d=this,e=d.length;if("string"!=typeof a)return this.pushStack(m(a).filter(function(){for(b=0;e>b;b++)if(m.contains(d[b],this))return!0}));for(b=0;e>b;b++)m.find(a,d[b],c);return c=this.pushStack(e>1?m.unique(c):c),c.selector=this.selector?this.selector+" "+a:a,c},filter:function(a){return this.pushStack(w(this,a||[],!1))},not:function(a){return this.pushStack(w(this,a||[],!0))},is:function(a){return!!w(this,"string"==typeof a&&t.test(a)?m(a):a||[],!1).length}});var x,y=a.document,z=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/,A=m.fn.init=function(a,b){var c,d;if(!a)return this;if("string"==typeof a){if(c="<"===a.charAt(0)&&">"===a.charAt(a.length-1)&&a.length>=3?[null,a,null]:z.exec(a),!c||!c[1]&&b)return!b||b.jquery?(b||x).find(a):this.constructor(b).find(a);if(c[1]){if(b=b instanceof m?b[0]:b,m.merge(this,m.parseHTML(c[1],b&&b.nodeType?b.ownerDocument||b:y,!0)),u.test(c[1])&&m.isPlainObject(b))for(c in b)m.isFunction(this[c])?this[c](b[c]):this.attr(c,b[c]);return this}if(d=y.getElementById(c[2]),d&&d.parentNode){if(d.id!==c[2])return x.find(a);this.length=1,this[0]=d}return this.context=y,this.selector=a,this}return a.nodeType?(this.context=this[0]=a,this.length=1,this):m.isFunction(a)?"undefined"!=typeof x.ready?x.ready(a):a(m):(void 0!==a.selector&&(this.selector=a.selector,this.context=a.context),m.makeArray(a,this))};A.prototype=m.fn,x=m(y);var B=/^(?:parents|prev(?:Until|All))/,C={children:!0,contents:!0,next:!0,prev:!0};m.extend({dir:function(a,b,c){var d=[],e=a[b];while(e&&9!==e.nodeType&&(void 0===c||1!==e.nodeType||!m(e).is(c)))1===e.nodeType&&d.push(e),e=e[b];return d},sibling:function(a,b){for(var c=[];a;a=a.nextSibling)1===a.nodeType&&a!==b&&c.push(a);return c}}),m.fn.extend({has:function(a){var b,c=m(a,this),d=c.length;return this.filter(function(){for(b=0;d>b;b++)if(m.contains(this,c[b]))return!0})},closest:function(a,b){for(var c,d=0,e=this.length,f=[],g=t.test(a)||"string"!=typeof a?m(a,b||this.context):0;e>d;d++)for(c=this[d];c&&c!==b;c=c.parentNode)if(c.nodeType<11&&(g?g.index(c)>-1:1===c.nodeType&&m.find.matchesSelector(c,a))){f.push(c);break}return this.pushStack(f.length>1?m.unique(f):f)},index:function(a){return a?"string"==typeof a?m.inArray(this[0],m(a)):m.inArray(a.jquery?a[0]:a,this):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(a,b){return this.pushStack(m.unique(m.merge(this.get(),m(a,b))))},addBack:function(a){return this.add(null==a?this.prevObject:this.prevObject.filter(a))}});function D(a,b){do a=a[b];while(a&&1!==a.nodeType);return a}m.each({parent:function(a){var b=a.parentNode;return b&&11!==b.nodeType?b:null},parents:function(a){return m.dir(a,"parentNode")},parentsUntil:function(a,b,c){return m.dir(a,"parentNode",c)},next:function(a){return D(a,"nextSibling")},prev:function(a){return D(a,"previousSibling")},nextAll:function(a){return m.dir(a,"nextSibling")},prevAll:function(a){return m.dir(a,"previousSibling")},nextUntil:function(a,b,c){return m.dir(a,"nextSibling",c)},prevUntil:function(a,b,c){return m.dir(a,"previousSibling",c)},siblings:function(a){return m.sibling((a.parentNode||{}).firstChild,a)},children:function(a){return m.sibling(a.firstChild)},contents:function(a){return m.nodeName(a,"iframe")?a.contentDocument||a.contentWindow.document:m.merge([],a.childNodes)}},function(a,b){m.fn[a]=function(c,d){var e=m.map(this,b,c);return"Until"!==a.slice(-5)&&(d=c),d&&"string"==typeof d&&(e=m.filter(d,e)),this.length>1&&(C[a]||(e=m.unique(e)),B.test(a)&&(e=e.reverse())),this.pushStack(e)}});var E=/\S+/g,F={};function G(a){var b=F[a]={};return m.each(a.match(E)||[],function(a,c){b[c]=!0}),b}m.Callbacks=function(a){a="string"==typeof a?F[a]||G(a):m.extend({},a);var b,c,d,e,f,g,h=[],i=!a.once&&[],j=function(l){for(c=a.memory&&l,d=!0,f=g||0,g=0,e=h.length,b=!0;h&&e>f;f++)if(h[f].apply(l[0],l[1])===!1&&a.stopOnFalse){c=!1;break}b=!1,h&&(i?i.length&&j(i.shift()):c?h=[]:k.disable())},k={add:function(){if(h){var d=h.length;!function f(b){m.each(b,function(b,c){var d=m.type(c);"function"===d?a.unique&&k.has(c)||h.push(c):c&&c.length&&"string"!==d&&f(c)})}(arguments),b?e=h.length:c&&(g=d,j(c))}return this},remove:function(){return h&&m.each(arguments,function(a,c){var d;while((d=m.inArray(c,h,d))>-1)h.splice(d,1),b&&(e>=d&&e--,f>=d&&f--)}),this},has:function(a){return a?m.inArray(a,h)>-1:!(!h||!h.length)},empty:function(){return h=[],e=0,this},disable:function(){return h=i=c=void 0,this},disabled:function(){return!h},lock:function(){return i=void 0,c||k.disable(),this},locked:function(){return!i},fireWith:function(a,c){return!h||d&&!i||(c=c||[],c=[a,c.slice?c.slice():c],b?i.push(c):j(c)),this},fire:function(){return k.fireWith(this,arguments),this},fired:function(){return!!d}};return k},m.extend({Deferred:function(a){var b=[["resolve","done",m.Callbacks("once memory"),"resolved"],["reject","fail",m.Callbacks("once memory"),"rejected"],["notify","progress",m.Callbacks("memory")]],c="pending",d={state:function(){return c},always:function(){return e.done(arguments).fail(arguments),this},then:function(){var a=arguments;return m.Deferred(function(c){m.each(b,function(b,f){var g=m.isFunction(a[b])&&a[b];e[f[1]](function(){var a=g&&g.apply(this,arguments);a&&m.isFunction(a.promise)?a.promise().done(c.resolve).fail(c.reject).progress(c.notify):c[f[0]+"With"](this===d?c.promise():this,g?[a]:arguments)})}),a=null}).promise()},promise:function(a){return null!=a?m.extend(a,d):d}},e={};return d.pipe=d.then,m.each(b,function(a,f){var g=f[2],h=f[3];d[f[1]]=g.add,h&&g.add(function(){c=h},b[1^a][2].disable,b[2][2].lock),e[f[0]]=function(){return e[f[0]+"With"](this===e?d:this,arguments),this},e[f[0]+"With"]=g.fireWith}),d.promise(e),a&&a.call(e,e),e},when:function(a){var b=0,c=d.call(arguments),e=c.length,f=1!==e||a&&m.isFunction(a.promise)?e:0,g=1===f?a:m.Deferred(),h=function(a,b,c){return function(e){b[a]=this,c[a]=arguments.length>1?d.call(arguments):e,c===i?g.notifyWith(b,c):--f||g.resolveWith(b,c)}},i,j,k;if(e>1)for(i=new Array(e),j=new Array(e),k=new Array(e);e>b;b++)c[b]&&m.isFunction(c[b].promise)?c[b].promise().done(h(b,k,c)).fail(g.reject).progress(h(b,j,i)):--f;return f||g.resolveWith(k,c),g.promise()}});var H;m.fn.ready=function(a){return m.ready.promise().done(a),this},m.extend({isReady:!1,readyWait:1,holdReady:function(a){a?m.readyWait++:m.ready(!0)},ready:function(a){if(a===!0?!--m.readyWait:!m.isReady){if(!y.body)return setTimeout(m.ready);m.isReady=!0,a!==!0&&--m.readyWait>0||(H.resolveWith(y,[m]),m.fn.triggerHandler&&(m(y).triggerHandler("ready"),m(y).off("ready")))}}});function I(){y.addEventListener?(y.removeEventListener("DOMContentLoaded",J,!1),a.removeEventListener("load",J,!1)):(y.detachEvent("onreadystatechange",J),a.detachEvent("onload",J))}function J(){(y.addEventListener||"load"===event.type||"complete"===y.readyState)&&(I(),m.ready())}m.ready.promise=function(b){if(!H)if(H=m.Deferred(),"complete"===y.readyState)setTimeout(m.ready);else if(y.addEventListener)y.addEventListener("DOMContentLoaded",J,!1),a.addEventListener("load",J,!1);else{y.attachEvent("onreadystatechange",J),a.attachEvent("onload",J);var c=!1;try{c=null==a.frameElement&&y.documentElement}catch(d){}c&&c.doScroll&&!function e(){if(!m.isReady){try{c.doScroll("left")}catch(a){return setTimeout(e,50)}I(),m.ready()}}()}return H.promise(b)};var K="undefined",L;for(L in m(k))break;k.ownLast="0"!==L,k.inlineBlockNeedsLayout=!1,m(function(){var a,b,c,d;c=y.getElementsByTagName("body")[0],c&&c.style&&(b=y.createElement("div"),d=y.createElement("div"),d.style.cssText="position:absolute;border:0;width:0;height:0;top:0;left:-9999px",c.appendChild(d).appendChild(b),typeof b.style.zoom!==K&&(b.style.cssText="display:inline;margin:0;border:0;padding:1px;width:1px;zoom:1",k.inlineBlockNeedsLayout=a=3===b.offsetWidth,a&&(c.style.zoom=1)),c.removeChild(d))}),function(){var a=y.createElement("div");if(null==k.deleteExpando){k.deleteExpando=!0;try{delete a.test}catch(b){k.deleteExpando=!1}}a=null}(),m.acceptData=function(a){var b=m.noData[(a.nodeName+" ").toLowerCase()],c=+a.nodeType||1;return 1!==c&&9!==c?!1:!b||b!==!0&&a.getAttribute("classid")===b};var M=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,N=/([A-Z])/g;function O(a,b,c){if(void 0===c&&1===a.nodeType){var d="data-"+b.replace(N,"-$1").toLowerCase();if(c=a.getAttribute(d),"string"==typeof c){try{c="true"===c?!0:"false"===c?!1:"null"===c?null:+c+""===c?+c:M.test(c)?m.parseJSON(c):c}catch(e){}m.data(a,b,c)}else c=void 0}return c}function P(a){var b;for(b in a)if(("data"!==b||!m.isEmptyObject(a[b]))&&"toJSON"!==b)return!1;

return!0}function Q(a,b,d,e){if(m.acceptData(a)){var f,g,h=m.expando,i=a.nodeType,j=i?m.cache:a,k=i?a[h]:a[h]&&h;if(k&&j[k]&&(e||j[k].data)||void 0!==d||"string"!=typeof b)return k||(k=i?a[h]=c.pop()||m.guid++:h),j[k]||(j[k]=i?{}:{toJSON:m.noop}),("object"==typeof b||"function"==typeof b)&&(e?j[k]=m.extend(j[k],b):j[k].data=m.extend(j[k].data,b)),g=j[k],e||(g.data||(g.data={}),g=g.data),void 0!==d&&(g[m.camelCase(b)]=d),"string"==typeof b?(f=g[b],null==f&&(f=g[m.camelCase(b)])):f=g,f}}function R(a,b,c){if(m.acceptData(a)){var d,e,f=a.nodeType,g=f?m.cache:a,h=f?a[m.expando]:m.expando;if(g[h]){if(b&&(d=c?g[h]:g[h].data)){m.isArray(b)?b=b.concat(m.map(b,m.camelCase)):b in d?b=[b]:(b=m.camelCase(b),b=b in d?[b]:b.split(" ")),e=b.length;while(e--)delete d[b[e]];if(c?!P(d):!m.isEmptyObject(d))return}(c||(delete g[h].data,P(g[h])))&&(f?m.cleanData([a],!0):k.deleteExpando||g!=g.window?delete g[h]:g[h]=null)}}}m.extend({cache:{},noData:{"applet ":!0,"embed ":!0,"object ":"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"},hasData:function(a){return a=a.nodeType?m.cache[a[m.expando]]:a[m.expando],!!a&&!P(a)},data:function(a,b,c){return Q(a,b,c)},removeData:function(a,b){return R(a,b)},_data:function(a,b,c){return Q(a,b,c,!0)},_removeData:function(a,b){return R(a,b,!0)}}),m.fn.extend({data:function(a,b){var c,d,e,f=this[0],g=f&&f.attributes;if(void 0===a){if(this.length&&(e=m.data(f),1===f.nodeType&&!m._data(f,"parsedAttrs"))){c=g.length;while(c--)g[c]&&(d=g[c].name,0===d.indexOf("data-")&&(d=m.camelCase(d.slice(5)),O(f,d,e[d])));m._data(f,"parsedAttrs",!0)}return e}return"object"==typeof a?this.each(function(){m.data(this,a)}):arguments.length>1?this.each(function(){m.data(this,a,b)}):f?O(f,a,m.data(f,a)):void 0},removeData:function(a){return this.each(function(){m.removeData(this,a)})}}),m.extend({queue:function(a,b,c){var d;return a?(b=(b||"fx")+"queue",d=m._data(a,b),c&&(!d||m.isArray(c)?d=m._data(a,b,m.makeArray(c)):d.push(c)),d||[]):void 0},dequeue:function(a,b){b=b||"fx";var c=m.queue(a,b),d=c.length,e=c.shift(),f=m._queueHooks(a,b),g=function(){m.dequeue(a,b)};"inprogress"===e&&(e=c.shift(),d--),e&&("fx"===b&&c.unshift("inprogress"),delete f.stop,e.call(a,g,f)),!d&&f&&f.empty.fire()},_queueHooks:function(a,b){var c=b+"queueHooks";return m._data(a,c)||m._data(a,c,{empty:m.Callbacks("once memory").add(function(){m._removeData(a,b+"queue"),m._removeData(a,c)})})}}),m.fn.extend({queue:function(a,b){var c=2;return"string"!=typeof a&&(b=a,a="fx",c--),arguments.length<c?m.queue(this[0],a):void 0===b?this:this.each(function(){var c=m.queue(this,a,b);m._queueHooks(this,a),"fx"===a&&"inprogress"!==c[0]&&m.dequeue(this,a)})},dequeue:function(a){return this.each(function(){m.dequeue(this,a)})},clearQueue:function(a){return this.queue(a||"fx",[])},promise:function(a,b){var c,d=1,e=m.Deferred(),f=this,g=this.length,h=function(){--d||e.resolveWith(f,[f])};"string"!=typeof a&&(b=a,a=void 0),a=a||"fx";while(g--)c=m._data(f[g],a+"queueHooks"),c&&c.empty&&(d++,c.empty.add(h));return h(),e.promise(b)}});var S=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,T=["Top","Right","Bottom","Left"],U=function(a,b){return a=b||a,"none"===m.css(a,"display")||!m.contains(a.ownerDocument,a)},V=m.access=function(a,b,c,d,e,f,g){var h=0,i=a.length,j=null==c;if("object"===m.type(c)){e=!0;for(h in c)m.access(a,b,h,c[h],!0,f,g)}else if(void 0!==d&&(e=!0,m.isFunction(d)||(g=!0),j&&(g?(b.call(a,d),b=null):(j=b,b=function(a,b,c){return j.call(m(a),c)})),b))for(;i>h;h++)b(a[h],c,g?d:d.call(a[h],h,b(a[h],c)));return e?a:j?b.call(a):i?b(a[0],c):f},W=/^(?:checkbox|radio)$/i;!function(){var a=y.createElement("input"),b=y.createElement("div"),c=y.createDocumentFragment();if(b.innerHTML="  <link/><table></table><a href='/a'>a</a><input type='checkbox'/>",k.leadingWhitespace=3===b.firstChild.nodeType,k.tbody=!b.getElementsByTagName("tbody").length,k.htmlSerialize=!!b.getElementsByTagName("link").length,k.html5Clone="<:nav></:nav>"!==y.createElement("nav").cloneNode(!0).outerHTML,a.type="checkbox",a.checked=!0,c.appendChild(a),k.appendChecked=a.checked,b.innerHTML="<textarea>x</textarea>",k.noCloneChecked=!!b.cloneNode(!0).lastChild.defaultValue,c.appendChild(b),b.innerHTML="<input type='radio' checked='checked' name='t'/>",k.checkClone=b.cloneNode(!0).cloneNode(!0).lastChild.checked,k.noCloneEvent=!0,b.attachEvent&&(b.attachEvent("onclick",function(){k.noCloneEvent=!1}),b.cloneNode(!0).click()),null==k.deleteExpando){k.deleteExpando=!0;try{delete b.test}catch(d){k.deleteExpando=!1}}}(),function(){var b,c,d=y.createElement("div");for(b in{submit:!0,change:!0,focusin:!0})c="on"+b,(k[b+"Bubbles"]=c in a)||(d.setAttribute(c,"t"),k[b+"Bubbles"]=d.attributes[c].expando===!1);d=null}();var X=/^(?:input|select|textarea)$/i,Y=/^key/,Z=/^(?:mouse|pointer|contextmenu)|click/,$=/^(?:focusinfocus|focusoutblur)$/,_=/^([^.]*)(?:\.(.+)|)$/;function aa(){return!0}function ba(){return!1}function ca(){try{return y.activeElement}catch(a){}}m.event={global:{},add:function(a,b,c,d,e){var f,g,h,i,j,k,l,n,o,p,q,r=m._data(a);if(r){c.handler&&(i=c,c=i.handler,e=i.selector),c.guid||(c.guid=m.guid++),(g=r.events)||(g=r.events={}),(k=r.handle)||(k=r.handle=function(a){return typeof m===K||a&&m.event.triggered===a.type?void 0:m.event.dispatch.apply(k.elem,arguments)},k.elem=a),b=(b||"").match(E)||[""],h=b.length;while(h--)f=_.exec(b[h])||[],o=q=f[1],p=(f[2]||"").split(".").sort(),o&&(j=m.event.special[o]||{},o=(e?j.delegateType:j.bindType)||o,j=m.event.special[o]||{},l=m.extend({type:o,origType:q,data:d,handler:c,guid:c.guid,selector:e,needsContext:e&&m.expr.match.needsContext.test(e),namespace:p.join(".")},i),(n=g[o])||(n=g[o]=[],n.delegateCount=0,j.setup&&j.setup.call(a,d,p,k)!==!1||(a.addEventListener?a.addEventListener(o,k,!1):a.attachEvent&&a.attachEvent("on"+o,k))),j.add&&(j.add.call(a,l),l.handler.guid||(l.handler.guid=c.guid)),e?n.splice(n.delegateCount++,0,l):n.push(l),m.event.global[o]=!0);a=null}},remove:function(a,b,c,d,e){var f,g,h,i,j,k,l,n,o,p,q,r=m.hasData(a)&&m._data(a);if(r&&(k=r.events)){b=(b||"").match(E)||[""],j=b.length;while(j--)if(h=_.exec(b[j])||[],o=q=h[1],p=(h[2]||"").split(".").sort(),o){l=m.event.special[o]||{},o=(d?l.delegateType:l.bindType)||o,n=k[o]||[],h=h[2]&&new RegExp("(^|\\.)"+p.join("\\.(?:.*\\.|)")+"(\\.|$)"),i=f=n.length;while(f--)g=n[f],!e&&q!==g.origType||c&&c.guid!==g.guid||h&&!h.test(g.namespace)||d&&d!==g.selector&&("**"!==d||!g.selector)||(n.splice(f,1),g.selector&&n.delegateCount--,l.remove&&l.remove.call(a,g));i&&!n.length&&(l.teardown&&l.teardown.call(a,p,r.handle)!==!1||m.removeEvent(a,o,r.handle),delete k[o])}else for(o in k)m.event.remove(a,o+b[j],c,d,!0);m.isEmptyObject(k)&&(delete r.handle,m._removeData(a,"events"))}},trigger:function(b,c,d,e){var f,g,h,i,k,l,n,o=[d||y],p=j.call(b,"type")?b.type:b,q=j.call(b,"namespace")?b.namespace.split("."):[];if(h=l=d=d||y,3!==d.nodeType&&8!==d.nodeType&&!$.test(p+m.event.triggered)&&(p.indexOf(".")>=0&&(q=p.split("."),p=q.shift(),q.sort()),g=p.indexOf(":")<0&&"on"+p,b=b[m.expando]?b:new m.Event(p,"object"==typeof b&&b),b.isTrigger=e?2:3,b.namespace=q.join("."),b.namespace_re=b.namespace?new RegExp("(^|\\.)"+q.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,b.result=void 0,b.target||(b.target=d),c=null==c?[b]:m.makeArray(c,[b]),k=m.event.special[p]||{},e||!k.trigger||k.trigger.apply(d,c)!==!1)){if(!e&&!k.noBubble&&!m.isWindow(d)){for(i=k.delegateType||p,$.test(i+p)||(h=h.parentNode);h;h=h.parentNode)o.push(h),l=h;l===(d.ownerDocument||y)&&o.push(l.defaultView||l.parentWindow||a)}n=0;while((h=o[n++])&&!b.isPropagationStopped())b.type=n>1?i:k.bindType||p,f=(m._data(h,"events")||{})[b.type]&&m._data(h,"handle"),f&&f.apply(h,c),f=g&&h[g],f&&f.apply&&m.acceptData(h)&&(b.result=f.apply(h,c),b.result===!1&&b.preventDefault());if(b.type=p,!e&&!b.isDefaultPrevented()&&(!k._default||k._default.apply(o.pop(),c)===!1)&&m.acceptData(d)&&g&&d[p]&&!m.isWindow(d)){l=d[g],l&&(d[g]=null),m.event.triggered=p;try{d[p]()}catch(r){}m.event.triggered=void 0,l&&(d[g]=l)}return b.result}},dispatch:function(a){a=m.event.fix(a);var b,c,e,f,g,h=[],i=d.call(arguments),j=(m._data(this,"events")||{})[a.type]||[],k=m.event.special[a.type]||{};if(i[0]=a,a.delegateTarget=this,!k.preDispatch||k.preDispatch.call(this,a)!==!1){h=m.event.handlers.call(this,a,j),b=0;while((f=h[b++])&&!a.isPropagationStopped()){a.currentTarget=f.elem,g=0;while((e=f.handlers[g++])&&!a.isImmediatePropagationStopped())(!a.namespace_re||a.namespace_re.test(e.namespace))&&(a.handleObj=e,a.data=e.data,c=((m.event.special[e.origType]||{}).handle||e.handler).apply(f.elem,i),void 0!==c&&(a.result=c)===!1&&(a.preventDefault(),a.stopPropagation()))}return k.postDispatch&&k.postDispatch.call(this,a),a.result}},handlers:function(a,b){var c,d,e,f,g=[],h=b.delegateCount,i=a.target;if(h&&i.nodeType&&(!a.button||"click"!==a.type))for(;i!=this;i=i.parentNode||this)if(1===i.nodeType&&(i.disabled!==!0||"click"!==a.type)){for(e=[],f=0;h>f;f++)d=b[f],c=d.selector+" ",void 0===e[c]&&(e[c]=d.needsContext?m(c,this).index(i)>=0:m.find(c,this,null,[i]).length),e[c]&&e.push(d);e.length&&g.push({elem:i,handlers:e})}return h<b.length&&g.push({elem:this,handlers:b.slice(h)}),g},fix:function(a){if(a[m.expando])return a;var b,c,d,e=a.type,f=a,g=this.fixHooks[e];g||(this.fixHooks[e]=g=Z.test(e)?this.mouseHooks:Y.test(e)?this.keyHooks:{}),d=g.props?this.props.concat(g.props):this.props,a=new m.Event(f),b=d.length;while(b--)c=d[b],a[c]=f[c];return a.target||(a.target=f.srcElement||y),3===a.target.nodeType&&(a.target=a.target.parentNode),a.metaKey=!!a.metaKey,g.filter?g.filter(a,f):a},props:"altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),fixHooks:{},keyHooks:{props:"char charCode key keyCode".split(" "),filter:function(a,b){return null==a.which&&(a.which=null!=b.charCode?b.charCode:b.keyCode),a}},mouseHooks:{props:"button buttons clientX clientY fromElement offsetX offsetY pageX pageY screenX screenY toElement".split(" "),filter:function(a,b){var c,d,e,f=b.button,g=b.fromElement;return null==a.pageX&&null!=b.clientX&&(d=a.target.ownerDocument||y,e=d.documentElement,c=d.body,a.pageX=b.clientX+(e&&e.scrollLeft||c&&c.scrollLeft||0)-(e&&e.clientLeft||c&&c.clientLeft||0),a.pageY=b.clientY+(e&&e.scrollTop||c&&c.scrollTop||0)-(e&&e.clientTop||c&&c.clientTop||0)),!a.relatedTarget&&g&&(a.relatedTarget=g===a.target?b.toElement:g),a.which||void 0===f||(a.which=1&f?1:2&f?3:4&f?2:0),a}},special:{load:{noBubble:!0},focus:{trigger:function(){if(this!==ca()&&this.focus)try{return this.focus(),!1}catch(a){}},delegateType:"focusin"},blur:{trigger:function(){return this===ca()&&this.blur?(this.blur(),!1):void 0},delegateType:"focusout"},click:{trigger:function(){return m.nodeName(this,"input")&&"checkbox"===this.type&&this.click?(this.click(),!1):void 0},_default:function(a){return m.nodeName(a.target,"a")}},beforeunload:{postDispatch:function(a){void 0!==a.result&&a.originalEvent&&(a.originalEvent.returnValue=a.result)}}},simulate:function(a,b,c,d){var e=m.extend(new m.Event,c,{type:a,isSimulated:!0,originalEvent:{}});d?m.event.trigger(e,null,b):m.event.dispatch.call(b,e),e.isDefaultPrevented()&&c.preventDefault()}},m.removeEvent=y.removeEventListener?function(a,b,c){a.removeEventListener&&a.removeEventListener(b,c,!1)}:function(a,b,c){var d="on"+b;a.detachEvent&&(typeof a[d]===K&&(a[d]=null),a.detachEvent(d,c))},m.Event=function(a,b){return this instanceof m.Event?(a&&a.type?(this.originalEvent=a,this.type=a.type,this.isDefaultPrevented=a.defaultPrevented||void 0===a.defaultPrevented&&a.returnValue===!1?aa:ba):this.type=a,b&&m.extend(this,b),this.timeStamp=a&&a.timeStamp||m.now(),void(this[m.expando]=!0)):new m.Event(a,b)},m.Event.prototype={isDefaultPrevented:ba,isPropagationStopped:ba,isImmediatePropagationStopped:ba,preventDefault:function(){var a=this.originalEvent;this.isDefaultPrevented=aa,a&&(a.preventDefault?a.preventDefault():a.returnValue=!1)},stopPropagation:function(){var a=this.originalEvent;this.isPropagationStopped=aa,a&&(a.stopPropagation&&a.stopPropagation(),a.cancelBubble=!0)},stopImmediatePropagation:function(){var a=this.originalEvent;this.isImmediatePropagationStopped=aa,a&&a.stopImmediatePropagation&&a.stopImmediatePropagation(),this.stopPropagation()}},m.each({mouseenter:"mouseover",mouseleave:"mouseout",pointerenter:"pointerover",pointerleave:"pointerout"},function(a,b){m.event.special[a]={delegateType:b,bindType:b,handle:function(a){var c,d=this,e=a.relatedTarget,f=a.handleObj;return(!e||e!==d&&!m.contains(d,e))&&(a.type=f.origType,c=f.handler.apply(this,arguments),a.type=b),c}}}),k.submitBubbles||(m.event.special.submit={setup:function(){return m.nodeName(this,"form")?!1:void m.event.add(this,"click._submit keypress._submit",function(a){var b=a.target,c=m.nodeName(b,"input")||m.nodeName(b,"button")?b.form:void 0;c&&!m._data(c,"submitBubbles")&&(m.event.add(c,"submit._submit",function(a){a._submit_bubble=!0}),m._data(c,"submitBubbles",!0))})},postDispatch:function(a){a._submit_bubble&&(delete a._submit_bubble,this.parentNode&&!a.isTrigger&&m.event.simulate("submit",this.parentNode,a,!0))},teardown:function(){return m.nodeName(this,"form")?!1:void m.event.remove(this,"._submit")}}),k.changeBubbles||(m.event.special.change={setup:function(){return X.test(this.nodeName)?(("checkbox"===this.type||"radio"===this.type)&&(m.event.add(this,"propertychange._change",function(a){"checked"===a.originalEvent.propertyName&&(this._just_changed=!0)}),m.event.add(this,"click._change",function(a){this._just_changed&&!a.isTrigger&&(this._just_changed=!1),m.event.simulate("change",this,a,!0)})),!1):void m.event.add(this,"beforeactivate._change",function(a){var b=a.target;X.test(b.nodeName)&&!m._data(b,"changeBubbles")&&(m.event.add(b,"change._change",function(a){!this.parentNode||a.isSimulated||a.isTrigger||m.event.simulate("change",this.parentNode,a,!0)}),m._data(b,"changeBubbles",!0))})},handle:function(a){var b=a.target;return this!==b||a.isSimulated||a.isTrigger||"radio"!==b.type&&"checkbox"!==b.type?a.handleObj.handler.apply(this,arguments):void 0},teardown:function(){return m.event.remove(this,"._change"),!X.test(this.nodeName)}}),k.focusinBubbles||m.each({focus:"focusin",blur:"focusout"},function(a,b){var c=function(a){m.event.simulate(b,a.target,m.event.fix(a),!0)};m.event.special[b]={setup:function(){var d=this.ownerDocument||this,e=m._data(d,b);e||d.addEventListener(a,c,!0),m._data(d,b,(e||0)+1)},teardown:function(){var d=this.ownerDocument||this,e=m._data(d,b)-1;e?m._data(d,b,e):(d.removeEventListener(a,c,!0),m._removeData(d,b))}}}),m.fn.extend({on:function(a,b,c,d,e){var f,g;if("object"==typeof a){"string"!=typeof b&&(c=c||b,b=void 0);for(f in a)this.on(f,b,c,a[f],e);return this}if(null==c&&null==d?(d=b,c=b=void 0):null==d&&("string"==typeof b?(d=c,c=void 0):(d=c,c=b,b=void 0)),d===!1)d=ba;else if(!d)return this;return 1===e&&(g=d,d=function(a){return m().off(a),g.apply(this,arguments)},d.guid=g.guid||(g.guid=m.guid++)),this.each(function(){m.event.add(this,a,d,c,b)})},one:function(a,b,c,d){return this.on(a,b,c,d,1)},off:function(a,b,c){var d,e;if(a&&a.preventDefault&&a.handleObj)return d=a.handleObj,m(a.delegateTarget).off(d.namespace?d.origType+"."+d.namespace:d.origType,d.selector,d.handler),this;if("object"==typeof a){for(e in a)this.off(e,b,a[e]);return this}return(b===!1||"function"==typeof b)&&(c=b,b=void 0),c===!1&&(c=ba),this.each(function(){m.event.remove(this,a,c,b)})},trigger:function(a,b){return this.each(function(){m.event.trigger(a,b,this)})},triggerHandler:function(a,b){var c=this[0];return c?m.event.trigger(a,b,c,!0):void 0}});function da(a){var b=ea.split("|"),c=a.createDocumentFragment();if(c.createElement)while(b.length)c.createElement(b.pop());return c}var ea="abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",fa=/ jQuery\d+="(?:null|\d+)"/g,ga=new RegExp("<(?:"+ea+")[\\s/>]","i"),ha=/^\s+/,ia=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,ja=/<([\w:]+)/,ka=/<tbody/i,la=/<|&#?\w+;/,ma=/<(?:script|style|link)/i,na=/checked\s*(?:[^=]|=\s*.checked.)/i,oa=/^$|\/(?:java|ecma)script/i,pa=/^true\/(.*)/,qa=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g,ra={option:[1,"<select multiple='multiple'>","</select>"],legend:[1,"<fieldset>","</fieldset>"],area:[1,"<map>","</map>"],param:[1,"<object>","</object>"],thead:[1,"<table>","</table>"],tr:[2,"<table><tbody>","</tbody></table>"],col:[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:k.htmlSerialize?[0,"",""]:[1,"X<div>","</div>"]},sa=da(y),ta=sa.appendChild(y.createElement("div"));ra.optgroup=ra.option,ra.tbody=ra.tfoot=ra.colgroup=ra.caption=ra.thead,ra.th=ra.td;function ua(a,b){var c,d,e=0,f=typeof a.getElementsByTagName!==K?a.getElementsByTagName(b||"*"):typeof a.querySelectorAll!==K?a.querySelectorAll(b||"*"):void 0;if(!f)for(f=[],c=a.childNodes||a;null!=(d=c[e]);e++)!b||m.nodeName(d,b)?f.push(d):m.merge(f,ua(d,b));return void 0===b||b&&m.nodeName(a,b)?m.merge([a],f):f}function va(a){W.test(a.type)&&(a.defaultChecked=a.checked)}function wa(a,b){return m.nodeName(a,"table")&&m.nodeName(11!==b.nodeType?b:b.firstChild,"tr")?a.getElementsByTagName("tbody")[0]||a.appendChild(a.ownerDocument.createElement("tbody")):a}function xa(a){return a.type=(null!==m.find.attr(a,"type"))+"/"+a.type,a}function ya(a){var b=pa.exec(a.type);return b?a.type=b[1]:a.removeAttribute("type"),a}function za(a,b){for(var c,d=0;null!=(c=a[d]);d++)m._data(c,"globalEval",!b||m._data(b[d],"globalEval"))}function Aa(a,b){if(1===b.nodeType&&m.hasData(a)){var c,d,e,f=m._data(a),g=m._data(b,f),h=f.events;if(h){delete g.handle,g.events={};for(c in h)for(d=0,e=h[c].length;e>d;d++)m.event.add(b,c,h[c][d])}g.data&&(g.data=m.extend({},g.data))}}function Ba(a,b){var c,d,e;if(1===b.nodeType){if(c=b.nodeName.toLowerCase(),!k.noCloneEvent&&b[m.expando]){e=m._data(b);for(d in e.events)m.removeEvent(b,d,e.handle);b.removeAttribute(m.expando)}"script"===c&&b.text!==a.text?(xa(b).text=a.text,ya(b)):"object"===c?(b.parentNode&&(b.outerHTML=a.outerHTML),k.html5Clone&&a.innerHTML&&!m.trim(b.innerHTML)&&(b.innerHTML=a.innerHTML)):"input"===c&&W.test(a.type)?(b.defaultChecked=b.checked=a.checked,b.value!==a.value&&(b.value=a.value)):"option"===c?b.defaultSelected=b.selected=a.defaultSelected:("input"===c||"textarea"===c)&&(b.defaultValue=a.defaultValue)}}m.extend({clone:function(a,b,c){var d,e,f,g,h,i=m.contains(a.ownerDocument,a);if(k.html5Clone||m.isXMLDoc(a)||!ga.test("<"+a.nodeName+">")?f=a.cloneNode(!0):(ta.innerHTML=a.outerHTML,ta.removeChild(f=ta.firstChild)),!(k.noCloneEvent&&k.noCloneChecked||1!==a.nodeType&&11!==a.nodeType||m.isXMLDoc(a)))for(d=ua(f),h=ua(a),g=0;null!=(e=h[g]);++g)d[g]&&Ba(e,d[g]);if(b)if(c)for(h=h||ua(a),d=d||ua(f),g=0;null!=(e=h[g]);g++)Aa(e,d[g]);else Aa(a,f);return d=ua(f,"script"),d.length>0&&za(d,!i&&ua(a,"script")),d=h=e=null,f},buildFragment:function(a,b,c,d){for(var e,f,g,h,i,j,l,n=a.length,o=da(b),p=[],q=0;n>q;q++)if(f=a[q],f||0===f)if("object"===m.type(f))m.merge(p,f.nodeType?[f]:f);else if(la.test(f)){h=h||o.appendChild(b.createElement("div")),i=(ja.exec(f)||["",""])[1].toLowerCase(),l=ra[i]||ra._default,h.innerHTML=l[1]+f.replace(ia,"<$1></$2>")+l[2],e=l[0];while(e--)h=h.lastChild;if(!k.leadingWhitespace&&ha.test(f)&&p.push(b.createTextNode(ha.exec(f)[0])),!k.tbody){f="table"!==i||ka.test(f)?"<table>"!==l[1]||ka.test(f)?0:h:h.firstChild,e=f&&f.childNodes.length;while(e--)m.nodeName(j=f.childNodes[e],"tbody")&&!j.childNodes.length&&f.removeChild(j)}m.merge(p,h.childNodes),h.textContent="";while(h.firstChild)h.removeChild(h.firstChild);h=o.lastChild}else p.push(b.createTextNode(f));h&&o.removeChild(h),k.appendChecked||m.grep(ua(p,"input"),va),q=0;while(f=p[q++])if((!d||-1===m.inArray(f,d))&&(g=m.contains(f.ownerDocument,f),h=ua(o.appendChild(f),"script"),g&&za(h),c)){e=0;while(f=h[e++])oa.test(f.type||"")&&c.push(f)}return h=null,o},cleanData:function(a,b){for(var d,e,f,g,h=0,i=m.expando,j=m.cache,l=k.deleteExpando,n=m.event.special;null!=(d=a[h]);h++)if((b||m.acceptData(d))&&(f=d[i],g=f&&j[f])){if(g.events)for(e in g.events)n[e]?m.event.remove(d,e):m.removeEvent(d,e,g.handle);j[f]&&(delete j[f],l?delete d[i]:typeof d.removeAttribute!==K?d.removeAttribute(i):d[i]=null,c.push(f))}}}),m.fn.extend({text:function(a){return V(this,function(a){return void 0===a?m.text(this):this.empty().append((this[0]&&this[0].ownerDocument||y).createTextNode(a))},null,a,arguments.length)},append:function(){return this.domManip(arguments,function(a){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var b=wa(this,a);b.appendChild(a)}})},prepend:function(){return this.domManip(arguments,function(a){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var b=wa(this,a);b.insertBefore(a,b.firstChild)}})},before:function(){return this.domManip(arguments,function(a){this.parentNode&&this.parentNode.insertBefore(a,this)})},after:function(){return this.domManip(arguments,function(a){this.parentNode&&this.parentNode.insertBefore(a,this.nextSibling)})},remove:function(a,b){for(var c,d=a?m.filter(a,this):this,e=0;null!=(c=d[e]);e++)b||1!==c.nodeType||m.cleanData(ua(c)),c.parentNode&&(b&&m.contains(c.ownerDocument,c)&&za(ua(c,"script")),c.parentNode.removeChild(c));return this},empty:function(){for(var a,b=0;null!=(a=this[b]);b++){1===a.nodeType&&m.cleanData(ua(a,!1));while(a.firstChild)a.removeChild(a.firstChild);a.options&&m.nodeName(a,"select")&&(a.options.length=0)}return this},clone:function(a,b){return a=null==a?!1:a,b=null==b?a:b,this.map(function(){return m.clone(this,a,b)})},html:function(a){return V(this,function(a){var b=this[0]||{},c=0,d=this.length;if(void 0===a)return 1===b.nodeType?b.innerHTML.replace(fa,""):void 0;if(!("string"!=typeof a||ma.test(a)||!k.htmlSerialize&&ga.test(a)||!k.leadingWhitespace&&ha.test(a)||ra[(ja.exec(a)||["",""])[1].toLowerCase()])){a=a.replace(ia,"<$1></$2>");try{for(;d>c;c++)b=this[c]||{},1===b.nodeType&&(m.cleanData(ua(b,!1)),b.innerHTML=a);b=0}catch(e){}}b&&this.empty().append(a)},null,a,arguments.length)},replaceWith:function(){var a=arguments[0];return this.domManip(arguments,function(b){a=this.parentNode,m.cleanData(ua(this)),a&&a.replaceChild(b,this)}),a&&(a.length||a.nodeType)?this:this.remove()},detach:function(a){return this.remove(a,!0)},domManip:function(a,b){a=e.apply([],a);var c,d,f,g,h,i,j=0,l=this.length,n=this,o=l-1,p=a[0],q=m.isFunction(p);if(q||l>1&&"string"==typeof p&&!k.checkClone&&na.test(p))return this.each(function(c){var d=n.eq(c);q&&(a[0]=p.call(this,c,d.html())),d.domManip(a,b)});if(l&&(i=m.buildFragment(a,this[0].ownerDocument,!1,this),c=i.firstChild,1===i.childNodes.length&&(i=c),c)){for(g=m.map(ua(i,"script"),xa),f=g.length;l>j;j++)d=i,j!==o&&(d=m.clone(d,!0,!0),f&&m.merge(g,ua(d,"script"))),b.call(this[j],d,j);if(f)for(h=g[g.length-1].ownerDocument,m.map(g,ya),j=0;f>j;j++)d=g[j],oa.test(d.type||"")&&!m._data(d,"globalEval")&&m.contains(h,d)&&(d.src?m._evalUrl&&m._evalUrl(d.src):m.globalEval((d.text||d.textContent||d.innerHTML||"").replace(qa,"")));i=c=null}return this}}),m.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(a,b){m.fn[a]=function(a){for(var c,d=0,e=[],g=m(a),h=g.length-1;h>=d;d++)c=d===h?this:this.clone(!0),m(g[d])[b](c),f.apply(e,c.get());return this.pushStack(e)}});var Ca,Da={};function Ea(b,c){var d,e=m(c.createElement(b)).appendTo(c.body),f=a.getDefaultComputedStyle&&(d=a.getDefaultComputedStyle(e[0]))?d.display:m.css(e[0],"display");return e.detach(),f}function Fa(a){var b=y,c=Da[a];return c||(c=Ea(a,b),"none"!==c&&c||(Ca=(Ca||m("<iframe frameborder='0' width='0' height='0'/>")).appendTo(b.documentElement),b=(Ca[0].contentWindow||Ca[0].contentDocument).document,b.write(),b.close(),c=Ea(a,b),Ca.detach()),Da[a]=c),c}!function(){var a;k.shrinkWrapBlocks=function(){if(null!=a)return a;a=!1;var b,c,d;return c=y.getElementsByTagName("body")[0],c&&c.style?(b=y.createElement("div"),d=y.createElement("div"),d.style.cssText="position:absolute;border:0;width:0;height:0;top:0;left:-9999px",c.appendChild(d).appendChild(b),typeof b.style.zoom!==K&&(b.style.cssText="-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;display:block;margin:0;border:0;padding:1px;width:1px;zoom:1",b.appendChild(y.createElement("div")).style.width="5px",a=3!==b.offsetWidth),c.removeChild(d),a):void 0}}();var Ga=/^margin/,Ha=new RegExp("^("+S+")(?!px)[a-z%]+$","i"),Ia,Ja,Ka=/^(top|right|bottom|left)$/;a.getComputedStyle?(Ia=function(b){return b.ownerDocument.defaultView.opener?b.ownerDocument.defaultView.getComputedStyle(b,null):a.getComputedStyle(b,null)},Ja=function(a,b,c){var d,e,f,g,h=a.style;return c=c||Ia(a),g=c?c.getPropertyValue(b)||c[b]:void 0,c&&(""!==g||m.contains(a.ownerDocument,a)||(g=m.style(a,b)),Ha.test(g)&&Ga.test(b)&&(d=h.width,e=h.minWidth,f=h.maxWidth,h.minWidth=h.maxWidth=h.width=g,g=c.width,h.width=d,h.minWidth=e,h.maxWidth=f)),void 0===g?g:g+""}):y.documentElement.currentStyle&&(Ia=function(a){return a.currentStyle},Ja=function(a,b,c){var d,e,f,g,h=a.style;return c=c||Ia(a),g=c?c[b]:void 0,null==g&&h&&h[b]&&(g=h[b]),Ha.test(g)&&!Ka.test(b)&&(d=h.left,e=a.runtimeStyle,f=e&&e.left,f&&(e.left=a.currentStyle.left),h.left="fontSize"===b?"1em":g,g=h.pixelLeft+"px",h.left=d,f&&(e.left=f)),void 0===g?g:g+""||"auto"});function La(a,b){return{get:function(){var c=a();if(null!=c)return c?void delete this.get:(this.get=b).apply(this,arguments)}}}!function(){var b,c,d,e,f,g,h;if(b=y.createElement("div"),b.innerHTML="  <link/><table></table><a href='/a'>a</a><input type='checkbox'/>",d=b.getElementsByTagName("a")[0],c=d&&d.style){c.cssText="float:left;opacity:.5",k.opacity="0.5"===c.opacity,k.cssFloat=!!c.cssFloat,b.style.backgroundClip="content-box",b.cloneNode(!0).style.backgroundClip="",k.clearCloneStyle="content-box"===b.style.backgroundClip,k.boxSizing=""===c.boxSizing||""===c.MozBoxSizing||""===c.WebkitBoxSizing,m.extend(k,{reliableHiddenOffsets:function(){return null==g&&i(),g},boxSizingReliable:function(){return null==f&&i(),f},pixelPosition:function(){return null==e&&i(),e},reliableMarginRight:function(){return null==h&&i(),h}});function i(){var b,c,d,i;c=y.getElementsByTagName("body")[0],c&&c.style&&(b=y.createElement("div"),d=y.createElement("div"),d.style.cssText="position:absolute;border:0;width:0;height:0;top:0;left:-9999px",c.appendChild(d).appendChild(b),b.style.cssText="-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;display:block;margin-top:1%;top:1%;border:1px;padding:1px;width:4px;position:absolute",e=f=!1,h=!0,a.getComputedStyle&&(e="1%"!==(a.getComputedStyle(b,null)||{}).top,f="4px"===(a.getComputedStyle(b,null)||{width:"4px"}).width,i=b.appendChild(y.createElement("div")),i.style.cssText=b.style.cssText="-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;display:block;margin:0;border:0;padding:0",i.style.marginRight=i.style.width="0",b.style.width="1px",h=!parseFloat((a.getComputedStyle(i,null)||{}).marginRight),b.removeChild(i)),b.innerHTML="<table><tr><td></td><td>t</td></tr></table>",i=b.getElementsByTagName("td"),i[0].style.cssText="margin:0;border:0;padding:0;display:none",g=0===i[0].offsetHeight,g&&(i[0].style.display="",i[1].style.display="none",g=0===i[0].offsetHeight),c.removeChild(d))}}}(),m.swap=function(a,b,c,d){var e,f,g={};for(f in b)g[f]=a.style[f],a.style[f]=b[f];e=c.apply(a,d||[]);for(f in b)a.style[f]=g[f];return e};var Ma=/alpha\([^)]*\)/i,Na=/opacity\s*=\s*([^)]*)/,Oa=/^(none|table(?!-c[ea]).+)/,Pa=new RegExp("^("+S+")(.*)$","i"),Qa=new RegExp("^([+-])=("+S+")","i"),Ra={position:"absolute",visibility:"hidden",display:"block"},Sa={letterSpacing:"0",fontWeight:"400"},Ta=["Webkit","O","Moz","ms"];function Ua(a,b){if(b in a)return b;var c=b.charAt(0).toUpperCase()+b.slice(1),d=b,e=Ta.length;while(e--)if(b=Ta[e]+c,b in a)return b;return d}function Va(a,b){for(var c,d,e,f=[],g=0,h=a.length;h>g;g++)d=a[g],d.style&&(f[g]=m._data(d,"olddisplay"),c=d.style.display,b?(f[g]||"none"!==c||(d.style.display=""),""===d.style.display&&U(d)&&(f[g]=m._data(d,"olddisplay",Fa(d.nodeName)))):(e=U(d),(c&&"none"!==c||!e)&&m._data(d,"olddisplay",e?c:m.css(d,"display"))));for(g=0;h>g;g++)d=a[g],d.style&&(b&&"none"!==d.style.display&&""!==d.style.display||(d.style.display=b?f[g]||"":"none"));return a}function Wa(a,b,c){var d=Pa.exec(b);return d?Math.max(0,d[1]-(c||0))+(d[2]||"px"):b}function Xa(a,b,c,d,e){for(var f=c===(d?"border":"content")?4:"width"===b?1:0,g=0;4>f;f+=2)"margin"===c&&(g+=m.css(a,c+T[f],!0,e)),d?("content"===c&&(g-=m.css(a,"padding"+T[f],!0,e)),"margin"!==c&&(g-=m.css(a,"border"+T[f]+"Width",!0,e))):(g+=m.css(a,"padding"+T[f],!0,e),"padding"!==c&&(g+=m.css(a,"border"+T[f]+"Width",!0,e)));return g}function Ya(a,b,c){var d=!0,e="width"===b?a.offsetWidth:a.offsetHeight,f=Ia(a),g=k.boxSizing&&"border-box"===m.css(a,"boxSizing",!1,f);if(0>=e||null==e){if(e=Ja(a,b,f),(0>e||null==e)&&(e=a.style[b]),Ha.test(e))return e;d=g&&(k.boxSizingReliable()||e===a.style[b]),e=parseFloat(e)||0}return e+Xa(a,b,c||(g?"border":"content"),d,f)+"px"}m.extend({cssHooks:{opacity:{get:function(a,b){if(b){var c=Ja(a,"opacity");return""===c?"1":c}}}},cssNumber:{columnCount:!0,fillOpacity:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":k.cssFloat?"cssFloat":"styleFloat"},style:function(a,b,c,d){if(a&&3!==a.nodeType&&8!==a.nodeType&&a.style){var e,f,g,h=m.camelCase(b),i=a.style;if(b=m.cssProps[h]||(m.cssProps[h]=Ua(i,h)),g=m.cssHooks[b]||m.cssHooks[h],void 0===c)return g&&"get"in g&&void 0!==(e=g.get(a,!1,d))?e:i[b];if(f=typeof c,"string"===f&&(e=Qa.exec(c))&&(c=(e[1]+1)*e[2]+parseFloat(m.css(a,b)),f="number"),null!=c&&c===c&&("number"!==f||m.cssNumber[h]||(c+="px"),k.clearCloneStyle||""!==c||0!==b.indexOf("background")||(i[b]="inherit"),!(g&&"set"in g&&void 0===(c=g.set(a,c,d)))))try{i[b]=c}catch(j){}}},css:function(a,b,c,d){var e,f,g,h=m.camelCase(b);return b=m.cssProps[h]||(m.cssProps[h]=Ua(a.style,h)),g=m.cssHooks[b]||m.cssHooks[h],g&&"get"in g&&(f=g.get(a,!0,c)),void 0===f&&(f=Ja(a,b,d)),"normal"===f&&b in Sa&&(f=Sa[b]),""===c||c?(e=parseFloat(f),c===!0||m.isNumeric(e)?e||0:f):f}}),m.each(["height","width"],function(a,b){m.cssHooks[b]={get:function(a,c,d){return c?Oa.test(m.css(a,"display"))&&0===a.offsetWidth?m.swap(a,Ra,function(){return Ya(a,b,d)}):Ya(a,b,d):void 0},set:function(a,c,d){var e=d&&Ia(a);return Wa(a,c,d?Xa(a,b,d,k.boxSizing&&"border-box"===m.css(a,"boxSizing",!1,e),e):0)}}}),k.opacity||(m.cssHooks.opacity={get:function(a,b){return Na.test((b&&a.currentStyle?a.currentStyle.filter:a.style.filter)||"")?.01*parseFloat(RegExp.$1)+"":b?"1":""},set:function(a,b){var c=a.style,d=a.currentStyle,e=m.isNumeric(b)?"alpha(opacity="+100*b+")":"",f=d&&d.filter||c.filter||"";c.zoom=1,(b>=1||""===b)&&""===m.trim(f.replace(Ma,""))&&c.removeAttribute&&(c.removeAttribute("filter"),""===b||d&&!d.filter)||(c.filter=Ma.test(f)?f.replace(Ma,e):f+" "+e)}}),m.cssHooks.marginRight=La(k.reliableMarginRight,function(a,b){return b?m.swap(a,{display:"inline-block"},Ja,[a,"marginRight"]):void 0}),m.each({margin:"",padding:"",border:"Width"},function(a,b){m.cssHooks[a+b]={expand:function(c){for(var d=0,e={},f="string"==typeof c?c.split(" "):[c];4>d;d++)e[a+T[d]+b]=f[d]||f[d-2]||f[0];return e}},Ga.test(a)||(m.cssHooks[a+b].set=Wa)}),m.fn.extend({css:function(a,b){return V(this,function(a,b,c){var d,e,f={},g=0;if(m.isArray(b)){for(d=Ia(a),e=b.length;e>g;g++)f[b[g]]=m.css(a,b[g],!1,d);return f}return void 0!==c?m.style(a,b,c):m.css(a,b)},a,b,arguments.length>1)},show:function(){return Va(this,!0)},hide:function(){return Va(this)},toggle:function(a){return"boolean"==typeof a?a?this.show():this.hide():this.each(function(){U(this)?m(this).show():m(this).hide()})}});function Za(a,b,c,d,e){
return new Za.prototype.init(a,b,c,d,e)}m.Tween=Za,Za.prototype={constructor:Za,init:function(a,b,c,d,e,f){this.elem=a,this.prop=c,this.easing=e||"swing",this.options=b,this.start=this.now=this.cur(),this.end=d,this.unit=f||(m.cssNumber[c]?"":"px")},cur:function(){var a=Za.propHooks[this.prop];return a&&a.get?a.get(this):Za.propHooks._default.get(this)},run:function(a){var b,c=Za.propHooks[this.prop];return this.options.duration?this.pos=b=m.easing[this.easing](a,this.options.duration*a,0,1,this.options.duration):this.pos=b=a,this.now=(this.end-this.start)*b+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),c&&c.set?c.set(this):Za.propHooks._default.set(this),this}},Za.prototype.init.prototype=Za.prototype,Za.propHooks={_default:{get:function(a){var b;return null==a.elem[a.prop]||a.elem.style&&null!=a.elem.style[a.prop]?(b=m.css(a.elem,a.prop,""),b&&"auto"!==b?b:0):a.elem[a.prop]},set:function(a){m.fx.step[a.prop]?m.fx.step[a.prop](a):a.elem.style&&(null!=a.elem.style[m.cssProps[a.prop]]||m.cssHooks[a.prop])?m.style(a.elem,a.prop,a.now+a.unit):a.elem[a.prop]=a.now}}},Za.propHooks.scrollTop=Za.propHooks.scrollLeft={set:function(a){a.elem.nodeType&&a.elem.parentNode&&(a.elem[a.prop]=a.now)}},m.easing={linear:function(a){return a},swing:function(a){return.5-Math.cos(a*Math.PI)/2}},m.fx=Za.prototype.init,m.fx.step={};var $a,_a,ab=/^(?:toggle|show|hide)$/,bb=new RegExp("^(?:([+-])=|)("+S+")([a-z%]*)$","i"),cb=/queueHooks$/,db=[ib],eb={"*":[function(a,b){var c=this.createTween(a,b),d=c.cur(),e=bb.exec(b),f=e&&e[3]||(m.cssNumber[a]?"":"px"),g=(m.cssNumber[a]||"px"!==f&&+d)&&bb.exec(m.css(c.elem,a)),h=1,i=20;if(g&&g[3]!==f){f=f||g[3],e=e||[],g=+d||1;do h=h||".5",g/=h,m.style(c.elem,a,g+f);while(h!==(h=c.cur()/d)&&1!==h&&--i)}return e&&(g=c.start=+g||+d||0,c.unit=f,c.end=e[1]?g+(e[1]+1)*e[2]:+e[2]),c}]};function fb(){return setTimeout(function(){$a=void 0}),$a=m.now()}function gb(a,b){var c,d={height:a},e=0;for(b=b?1:0;4>e;e+=2-b)c=T[e],d["margin"+c]=d["padding"+c]=a;return b&&(d.opacity=d.width=a),d}function hb(a,b,c){for(var d,e=(eb[b]||[]).concat(eb["*"]),f=0,g=e.length;g>f;f++)if(d=e[f].call(c,b,a))return d}function ib(a,b,c){var d,e,f,g,h,i,j,l,n=this,o={},p=a.style,q=a.nodeType&&U(a),r=m._data(a,"fxshow");c.queue||(h=m._queueHooks(a,"fx"),null==h.unqueued&&(h.unqueued=0,i=h.empty.fire,h.empty.fire=function(){h.unqueued||i()}),h.unqueued++,n.always(function(){n.always(function(){h.unqueued--,m.queue(a,"fx").length||h.empty.fire()})})),1===a.nodeType&&("height"in b||"width"in b)&&(c.overflow=[p.overflow,p.overflowX,p.overflowY],j=m.css(a,"display"),l="none"===j?m._data(a,"olddisplay")||Fa(a.nodeName):j,"inline"===l&&"none"===m.css(a,"float")&&(k.inlineBlockNeedsLayout&&"inline"!==Fa(a.nodeName)?p.zoom=1:p.display="inline-block")),c.overflow&&(p.overflow="hidden",k.shrinkWrapBlocks()||n.always(function(){p.overflow=c.overflow[0],p.overflowX=c.overflow[1],p.overflowY=c.overflow[2]}));for(d in b)if(e=b[d],ab.exec(e)){if(delete b[d],f=f||"toggle"===e,e===(q?"hide":"show")){if("show"!==e||!r||void 0===r[d])continue;q=!0}o[d]=r&&r[d]||m.style(a,d)}else j=void 0;if(m.isEmptyObject(o))"inline"===("none"===j?Fa(a.nodeName):j)&&(p.display=j);else{r?"hidden"in r&&(q=r.hidden):r=m._data(a,"fxshow",{}),f&&(r.hidden=!q),q?m(a).show():n.done(function(){m(a).hide()}),n.done(function(){var b;m._removeData(a,"fxshow");for(b in o)m.style(a,b,o[b])});for(d in o)g=hb(q?r[d]:0,d,n),d in r||(r[d]=g.start,q&&(g.end=g.start,g.start="width"===d||"height"===d?1:0))}}function jb(a,b){var c,d,e,f,g;for(c in a)if(d=m.camelCase(c),e=b[d],f=a[c],m.isArray(f)&&(e=f[1],f=a[c]=f[0]),c!==d&&(a[d]=f,delete a[c]),g=m.cssHooks[d],g&&"expand"in g){f=g.expand(f),delete a[d];for(c in f)c in a||(a[c]=f[c],b[c]=e)}else b[d]=e}function kb(a,b,c){var d,e,f=0,g=db.length,h=m.Deferred().always(function(){delete i.elem}),i=function(){if(e)return!1;for(var b=$a||fb(),c=Math.max(0,j.startTime+j.duration-b),d=c/j.duration||0,f=1-d,g=0,i=j.tweens.length;i>g;g++)j.tweens[g].run(f);return h.notifyWith(a,[j,f,c]),1>f&&i?c:(h.resolveWith(a,[j]),!1)},j=h.promise({elem:a,props:m.extend({},b),opts:m.extend(!0,{specialEasing:{}},c),originalProperties:b,originalOptions:c,startTime:$a||fb(),duration:c.duration,tweens:[],createTween:function(b,c){var d=m.Tween(a,j.opts,b,c,j.opts.specialEasing[b]||j.opts.easing);return j.tweens.push(d),d},stop:function(b){var c=0,d=b?j.tweens.length:0;if(e)return this;for(e=!0;d>c;c++)j.tweens[c].run(1);return b?h.resolveWith(a,[j,b]):h.rejectWith(a,[j,b]),this}}),k=j.props;for(jb(k,j.opts.specialEasing);g>f;f++)if(d=db[f].call(j,a,k,j.opts))return d;return m.map(k,hb,j),m.isFunction(j.opts.start)&&j.opts.start.call(a,j),m.fx.timer(m.extend(i,{elem:a,anim:j,queue:j.opts.queue})),j.progress(j.opts.progress).done(j.opts.done,j.opts.complete).fail(j.opts.fail).always(j.opts.always)}m.Animation=m.extend(kb,{tweener:function(a,b){m.isFunction(a)?(b=a,a=["*"]):a=a.split(" ");for(var c,d=0,e=a.length;e>d;d++)c=a[d],eb[c]=eb[c]||[],eb[c].unshift(b)},prefilter:function(a,b){b?db.unshift(a):db.push(a)}}),m.speed=function(a,b,c){var d=a&&"object"==typeof a?m.extend({},a):{complete:c||!c&&b||m.isFunction(a)&&a,duration:a,easing:c&&b||b&&!m.isFunction(b)&&b};return d.duration=m.fx.off?0:"number"==typeof d.duration?d.duration:d.duration in m.fx.speeds?m.fx.speeds[d.duration]:m.fx.speeds._default,(null==d.queue||d.queue===!0)&&(d.queue="fx"),d.old=d.complete,d.complete=function(){m.isFunction(d.old)&&d.old.call(this),d.queue&&m.dequeue(this,d.queue)},d},m.fn.extend({fadeTo:function(a,b,c,d){return this.filter(U).css("opacity",0).show().end().animate({opacity:b},a,c,d)},animate:function(a,b,c,d){var e=m.isEmptyObject(a),f=m.speed(b,c,d),g=function(){var b=kb(this,m.extend({},a),f);(e||m._data(this,"finish"))&&b.stop(!0)};return g.finish=g,e||f.queue===!1?this.each(g):this.queue(f.queue,g)},stop:function(a,b,c){var d=function(a){var b=a.stop;delete a.stop,b(c)};return"string"!=typeof a&&(c=b,b=a,a=void 0),b&&a!==!1&&this.queue(a||"fx",[]),this.each(function(){var b=!0,e=null!=a&&a+"queueHooks",f=m.timers,g=m._data(this);if(e)g[e]&&g[e].stop&&d(g[e]);else for(e in g)g[e]&&g[e].stop&&cb.test(e)&&d(g[e]);for(e=f.length;e--;)f[e].elem!==this||null!=a&&f[e].queue!==a||(f[e].anim.stop(c),b=!1,f.splice(e,1));(b||!c)&&m.dequeue(this,a)})},finish:function(a){return a!==!1&&(a=a||"fx"),this.each(function(){var b,c=m._data(this),d=c[a+"queue"],e=c[a+"queueHooks"],f=m.timers,g=d?d.length:0;for(c.finish=!0,m.queue(this,a,[]),e&&e.stop&&e.stop.call(this,!0),b=f.length;b--;)f[b].elem===this&&f[b].queue===a&&(f[b].anim.stop(!0),f.splice(b,1));for(b=0;g>b;b++)d[b]&&d[b].finish&&d[b].finish.call(this);delete c.finish})}}),m.each(["toggle","show","hide"],function(a,b){var c=m.fn[b];m.fn[b]=function(a,d,e){return null==a||"boolean"==typeof a?c.apply(this,arguments):this.animate(gb(b,!0),a,d,e)}}),m.each({slideDown:gb("show"),slideUp:gb("hide"),slideToggle:gb("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(a,b){m.fn[a]=function(a,c,d){return this.animate(b,a,c,d)}}),m.timers=[],m.fx.tick=function(){var a,b=m.timers,c=0;for($a=m.now();c<b.length;c++)a=b[c],a()||b[c]!==a||b.splice(c--,1);b.length||m.fx.stop(),$a=void 0},m.fx.timer=function(a){m.timers.push(a),a()?m.fx.start():m.timers.pop()},m.fx.interval=13,m.fx.start=function(){_a||(_a=setInterval(m.fx.tick,m.fx.interval))},m.fx.stop=function(){clearInterval(_a),_a=null},m.fx.speeds={slow:600,fast:200,_default:400},m.fn.delay=function(a,b){return a=m.fx?m.fx.speeds[a]||a:a,b=b||"fx",this.queue(b,function(b,c){var d=setTimeout(b,a);c.stop=function(){clearTimeout(d)}})},function(){var a,b,c,d,e;b=y.createElement("div"),b.setAttribute("className","t"),b.innerHTML="  <link/><table></table><a href='/a'>a</a><input type='checkbox'/>",d=b.getElementsByTagName("a")[0],c=y.createElement("select"),e=c.appendChild(y.createElement("option")),a=b.getElementsByTagName("input")[0],d.style.cssText="top:1px",k.getSetAttribute="t"!==b.className,k.style=/top/.test(d.getAttribute("style")),k.hrefNormalized="/a"===d.getAttribute("href"),k.checkOn=!!a.value,k.optSelected=e.selected,k.enctype=!!y.createElement("form").enctype,c.disabled=!0,k.optDisabled=!e.disabled,a=y.createElement("input"),a.setAttribute("value",""),k.input=""===a.getAttribute("value"),a.value="t",a.setAttribute("type","radio"),k.radioValue="t"===a.value}();var lb=/\r/g;m.fn.extend({val:function(a){var b,c,d,e=this[0];{if(arguments.length)return d=m.isFunction(a),this.each(function(c){var e;1===this.nodeType&&(e=d?a.call(this,c,m(this).val()):a,null==e?e="":"number"==typeof e?e+="":m.isArray(e)&&(e=m.map(e,function(a){return null==a?"":a+""})),b=m.valHooks[this.type]||m.valHooks[this.nodeName.toLowerCase()],b&&"set"in b&&void 0!==b.set(this,e,"value")||(this.value=e))});if(e)return b=m.valHooks[e.type]||m.valHooks[e.nodeName.toLowerCase()],b&&"get"in b&&void 0!==(c=b.get(e,"value"))?c:(c=e.value,"string"==typeof c?c.replace(lb,""):null==c?"":c)}}}),m.extend({valHooks:{option:{get:function(a){var b=m.find.attr(a,"value");return null!=b?b:m.trim(m.text(a))}},select:{get:function(a){for(var b,c,d=a.options,e=a.selectedIndex,f="select-one"===a.type||0>e,g=f?null:[],h=f?e+1:d.length,i=0>e?h:f?e:0;h>i;i++)if(c=d[i],!(!c.selected&&i!==e||(k.optDisabled?c.disabled:null!==c.getAttribute("disabled"))||c.parentNode.disabled&&m.nodeName(c.parentNode,"optgroup"))){if(b=m(c).val(),f)return b;g.push(b)}return g},set:function(a,b){var c,d,e=a.options,f=m.makeArray(b),g=e.length;while(g--)if(d=e[g],m.inArray(m.valHooks.option.get(d),f)>=0)try{d.selected=c=!0}catch(h){d.scrollHeight}else d.selected=!1;return c||(a.selectedIndex=-1),e}}}}),m.each(["radio","checkbox"],function(){m.valHooks[this]={set:function(a,b){return m.isArray(b)?a.checked=m.inArray(m(a).val(),b)>=0:void 0}},k.checkOn||(m.valHooks[this].get=function(a){return null===a.getAttribute("value")?"on":a.value})});var mb,nb,ob=m.expr.attrHandle,pb=/^(?:checked|selected)$/i,qb=k.getSetAttribute,rb=k.input;m.fn.extend({attr:function(a,b){return V(this,m.attr,a,b,arguments.length>1)},removeAttr:function(a){return this.each(function(){m.removeAttr(this,a)})}}),m.extend({attr:function(a,b,c){var d,e,f=a.nodeType;if(a&&3!==f&&8!==f&&2!==f)return typeof a.getAttribute===K?m.prop(a,b,c):(1===f&&m.isXMLDoc(a)||(b=b.toLowerCase(),d=m.attrHooks[b]||(m.expr.match.bool.test(b)?nb:mb)),void 0===c?d&&"get"in d&&null!==(e=d.get(a,b))?e:(e=m.find.attr(a,b),null==e?void 0:e):null!==c?d&&"set"in d&&void 0!==(e=d.set(a,c,b))?e:(a.setAttribute(b,c+""),c):void m.removeAttr(a,b))},removeAttr:function(a,b){var c,d,e=0,f=b&&b.match(E);if(f&&1===a.nodeType)while(c=f[e++])d=m.propFix[c]||c,m.expr.match.bool.test(c)?rb&&qb||!pb.test(c)?a[d]=!1:a[m.camelCase("default-"+c)]=a[d]=!1:m.attr(a,c,""),a.removeAttribute(qb?c:d)},attrHooks:{type:{set:function(a,b){if(!k.radioValue&&"radio"===b&&m.nodeName(a,"input")){var c=a.value;return a.setAttribute("type",b),c&&(a.value=c),b}}}}}),nb={set:function(a,b,c){return b===!1?m.removeAttr(a,c):rb&&qb||!pb.test(c)?a.setAttribute(!qb&&m.propFix[c]||c,c):a[m.camelCase("default-"+c)]=a[c]=!0,c}},m.each(m.expr.match.bool.source.match(/\w+/g),function(a,b){var c=ob[b]||m.find.attr;ob[b]=rb&&qb||!pb.test(b)?function(a,b,d){var e,f;return d||(f=ob[b],ob[b]=e,e=null!=c(a,b,d)?b.toLowerCase():null,ob[b]=f),e}:function(a,b,c){return c?void 0:a[m.camelCase("default-"+b)]?b.toLowerCase():null}}),rb&&qb||(m.attrHooks.value={set:function(a,b,c){return m.nodeName(a,"input")?void(a.defaultValue=b):mb&&mb.set(a,b,c)}}),qb||(mb={set:function(a,b,c){var d=a.getAttributeNode(c);return d||a.setAttributeNode(d=a.ownerDocument.createAttribute(c)),d.value=b+="","value"===c||b===a.getAttribute(c)?b:void 0}},ob.id=ob.name=ob.coords=function(a,b,c){var d;return c?void 0:(d=a.getAttributeNode(b))&&""!==d.value?d.value:null},m.valHooks.button={get:function(a,b){var c=a.getAttributeNode(b);return c&&c.specified?c.value:void 0},set:mb.set},m.attrHooks.contenteditable={set:function(a,b,c){mb.set(a,""===b?!1:b,c)}},m.each(["width","height"],function(a,b){m.attrHooks[b]={set:function(a,c){return""===c?(a.setAttribute(b,"auto"),c):void 0}}})),k.style||(m.attrHooks.style={get:function(a){return a.style.cssText||void 0},set:function(a,b){return a.style.cssText=b+""}});var sb=/^(?:input|select|textarea|button|object)$/i,tb=/^(?:a|area)$/i;m.fn.extend({prop:function(a,b){return V(this,m.prop,a,b,arguments.length>1)},removeProp:function(a){return a=m.propFix[a]||a,this.each(function(){try{this[a]=void 0,delete this[a]}catch(b){}})}}),m.extend({propFix:{"for":"htmlFor","class":"className"},prop:function(a,b,c){var d,e,f,g=a.nodeType;if(a&&3!==g&&8!==g&&2!==g)return f=1!==g||!m.isXMLDoc(a),f&&(b=m.propFix[b]||b,e=m.propHooks[b]),void 0!==c?e&&"set"in e&&void 0!==(d=e.set(a,c,b))?d:a[b]=c:e&&"get"in e&&null!==(d=e.get(a,b))?d:a[b]},propHooks:{tabIndex:{get:function(a){var b=m.find.attr(a,"tabindex");return b?parseInt(b,10):sb.test(a.nodeName)||tb.test(a.nodeName)&&a.href?0:-1}}}}),k.hrefNormalized||m.each(["href","src"],function(a,b){m.propHooks[b]={get:function(a){return a.getAttribute(b,4)}}}),k.optSelected||(m.propHooks.selected={get:function(a){var b=a.parentNode;return b&&(b.selectedIndex,b.parentNode&&b.parentNode.selectedIndex),null}}),m.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){m.propFix[this.toLowerCase()]=this}),k.enctype||(m.propFix.enctype="encoding");var ub=/[\t\r\n\f]/g;m.fn.extend({addClass:function(a){var b,c,d,e,f,g,h=0,i=this.length,j="string"==typeof a&&a;if(m.isFunction(a))return this.each(function(b){m(this).addClass(a.call(this,b,this.className))});if(j)for(b=(a||"").match(E)||[];i>h;h++)if(c=this[h],d=1===c.nodeType&&(c.className?(" "+c.className+" ").replace(ub," "):" ")){f=0;while(e=b[f++])d.indexOf(" "+e+" ")<0&&(d+=e+" ");g=m.trim(d),c.className!==g&&(c.className=g)}return this},removeClass:function(a){var b,c,d,e,f,g,h=0,i=this.length,j=0===arguments.length||"string"==typeof a&&a;if(m.isFunction(a))return this.each(function(b){m(this).removeClass(a.call(this,b,this.className))});if(j)for(b=(a||"").match(E)||[];i>h;h++)if(c=this[h],d=1===c.nodeType&&(c.className?(" "+c.className+" ").replace(ub," "):"")){f=0;while(e=b[f++])while(d.indexOf(" "+e+" ")>=0)d=d.replace(" "+e+" "," ");g=a?m.trim(d):"",c.className!==g&&(c.className=g)}return this},toggleClass:function(a,b){var c=typeof a;return"boolean"==typeof b&&"string"===c?b?this.addClass(a):this.removeClass(a):this.each(m.isFunction(a)?function(c){m(this).toggleClass(a.call(this,c,this.className,b),b)}:function(){if("string"===c){var b,d=0,e=m(this),f=a.match(E)||[];while(b=f[d++])e.hasClass(b)?e.removeClass(b):e.addClass(b)}else(c===K||"boolean"===c)&&(this.className&&m._data(this,"__className__",this.className),this.className=this.className||a===!1?"":m._data(this,"__className__")||"")})},hasClass:function(a){for(var b=" "+a+" ",c=0,d=this.length;d>c;c++)if(1===this[c].nodeType&&(" "+this[c].className+" ").replace(ub," ").indexOf(b)>=0)return!0;return!1}}),m.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error contextmenu".split(" "),function(a,b){m.fn[b]=function(a,c){return arguments.length>0?this.on(b,null,a,c):this.trigger(b)}}),m.fn.extend({hover:function(a,b){return this.mouseenter(a).mouseleave(b||a)},bind:function(a,b,c){return this.on(a,null,b,c)},unbind:function(a,b){return this.off(a,null,b)},delegate:function(a,b,c,d){return this.on(b,a,c,d)},undelegate:function(a,b,c){return 1===arguments.length?this.off(a,"**"):this.off(b,a||"**",c)}});var vb=m.now(),wb=/\?/,xb=/(,)|(\[|{)|(}|])|"(?:[^"\\\r\n]|\\["\\\/bfnrt]|\\u[\da-fA-F]{4})*"\s*:?|true|false|null|-?(?!0\d)\d+(?:\.\d+|)(?:[eE][+-]?\d+|)/g;m.parseJSON=function(b){if(a.JSON&&a.JSON.parse)return a.JSON.parse(b+"");var c,d=null,e=m.trim(b+"");return e&&!m.trim(e.replace(xb,function(a,b,e,f){return c&&b&&(d=0),0===d?a:(c=e||b,d+=!f-!e,"")}))?Function("return "+e)():m.error("Invalid JSON: "+b)},m.parseXML=function(b){var c,d;if(!b||"string"!=typeof b)return null;try{a.DOMParser?(d=new DOMParser,c=d.parseFromString(b,"text/xml")):(c=new ActiveXObject("Microsoft.XMLDOM"),c.async="false",c.loadXML(b))}catch(e){c=void 0}return c&&c.documentElement&&!c.getElementsByTagName("parsererror").length||m.error("Invalid XML: "+b),c};var yb,zb,Ab=/#.*$/,Bb=/([?&])_=[^&]*/,Cb=/^(.*?):[ \t]*([^\r\n]*)\r?$/gm,Db=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,Eb=/^(?:GET|HEAD)$/,Fb=/^\/\//,Gb=/^([\w.+-]+:)(?:\/\/(?:[^\/?#]*@|)([^\/?#:]*)(?::(\d+)|)|)/,Hb={},Ib={},Jb="*/".concat("*");try{zb=location.href}catch(Kb){zb=y.createElement("a"),zb.href="",zb=zb.href}yb=Gb.exec(zb.toLowerCase())||[];function Lb(a){return function(b,c){"string"!=typeof b&&(c=b,b="*");var d,e=0,f=b.toLowerCase().match(E)||[];if(m.isFunction(c))while(d=f[e++])"+"===d.charAt(0)?(d=d.slice(1)||"*",(a[d]=a[d]||[]).unshift(c)):(a[d]=a[d]||[]).push(c)}}function Mb(a,b,c,d){var e={},f=a===Ib;function g(h){var i;return e[h]=!0,m.each(a[h]||[],function(a,h){var j=h(b,c,d);return"string"!=typeof j||f||e[j]?f?!(i=j):void 0:(b.dataTypes.unshift(j),g(j),!1)}),i}return g(b.dataTypes[0])||!e["*"]&&g("*")}function Nb(a,b){var c,d,e=m.ajaxSettings.flatOptions||{};for(d in b)void 0!==b[d]&&((e[d]?a:c||(c={}))[d]=b[d]);return c&&m.extend(!0,a,c),a}function Ob(a,b,c){var d,e,f,g,h=a.contents,i=a.dataTypes;while("*"===i[0])i.shift(),void 0===e&&(e=a.mimeType||b.getResponseHeader("Content-Type"));if(e)for(g in h)if(h[g]&&h[g].test(e)){i.unshift(g);break}if(i[0]in c)f=i[0];else{for(g in c){if(!i[0]||a.converters[g+" "+i[0]]){f=g;break}d||(d=g)}f=f||d}return f?(f!==i[0]&&i.unshift(f),c[f]):void 0}function Pb(a,b,c,d){var e,f,g,h,i,j={},k=a.dataTypes.slice();if(k[1])for(g in a.converters)j[g.toLowerCase()]=a.converters[g];f=k.shift();while(f)if(a.responseFields[f]&&(c[a.responseFields[f]]=b),!i&&d&&a.dataFilter&&(b=a.dataFilter(b,a.dataType)),i=f,f=k.shift())if("*"===f)f=i;else if("*"!==i&&i!==f){if(g=j[i+" "+f]||j["* "+f],!g)for(e in j)if(h=e.split(" "),h[1]===f&&(g=j[i+" "+h[0]]||j["* "+h[0]])){g===!0?g=j[e]:j[e]!==!0&&(f=h[0],k.unshift(h[1]));break}if(g!==!0)if(g&&a["throws"])b=g(b);else try{b=g(b)}catch(l){return{state:"parsererror",error:g?l:"No conversion from "+i+" to "+f}}}return{state:"success",data:b}}m.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:zb,type:"GET",isLocal:Db.test(yb[1]),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":Jb,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":m.parseJSON,"text xml":m.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(a,b){return b?Nb(Nb(a,m.ajaxSettings),b):Nb(m.ajaxSettings,a)},ajaxPrefilter:Lb(Hb),ajaxTransport:Lb(Ib),ajax:function(a,b){"object"==typeof a&&(b=a,a=void 0),b=b||{};var c,d,e,f,g,h,i,j,k=m.ajaxSetup({},b),l=k.context||k,n=k.context&&(l.nodeType||l.jquery)?m(l):m.event,o=m.Deferred(),p=m.Callbacks("once memory"),q=k.statusCode||{},r={},s={},t=0,u="canceled",v={readyState:0,getResponseHeader:function(a){var b;if(2===t){if(!j){j={};while(b=Cb.exec(f))j[b[1].toLowerCase()]=b[2]}b=j[a.toLowerCase()]}return null==b?null:b},getAllResponseHeaders:function(){return 2===t?f:null},setRequestHeader:function(a,b){var c=a.toLowerCase();return t||(a=s[c]=s[c]||a,r[a]=b),this},overrideMimeType:function(a){return t||(k.mimeType=a),this},statusCode:function(a){var b;if(a)if(2>t)for(b in a)q[b]=[q[b],a[b]];else v.always(a[v.status]);return this},abort:function(a){var b=a||u;return i&&i.abort(b),x(0,b),this}};if(o.promise(v).complete=p.add,v.success=v.done,v.error=v.fail,k.url=((a||k.url||zb)+"").replace(Ab,"").replace(Fb,yb[1]+"//"),k.type=b.method||b.type||k.method||k.type,k.dataTypes=m.trim(k.dataType||"*").toLowerCase().match(E)||[""],null==k.crossDomain&&(c=Gb.exec(k.url.toLowerCase()),k.crossDomain=!(!c||c[1]===yb[1]&&c[2]===yb[2]&&(c[3]||("http:"===c[1]?"80":"443"))===(yb[3]||("http:"===yb[1]?"80":"443")))),k.data&&k.processData&&"string"!=typeof k.data&&(k.data=m.param(k.data,k.traditional)),Mb(Hb,k,b,v),2===t)return v;h=m.event&&k.global,h&&0===m.active++&&m.event.trigger("ajaxStart"),k.type=k.type.toUpperCase(),k.hasContent=!Eb.test(k.type),e=k.url,k.hasContent||(k.data&&(e=k.url+=(wb.test(e)?"&":"?")+k.data,delete k.data),k.cache===!1&&(k.url=Bb.test(e)?e.replace(Bb,"$1_="+vb++):e+(wb.test(e)?"&":"?")+"_="+vb++)),k.ifModified&&(m.lastModified[e]&&v.setRequestHeader("If-Modified-Since",m.lastModified[e]),m.etag[e]&&v.setRequestHeader("If-None-Match",m.etag[e])),(k.data&&k.hasContent&&k.contentType!==!1||b.contentType)&&v.setRequestHeader("Content-Type",k.contentType),v.setRequestHeader("Accept",k.dataTypes[0]&&k.accepts[k.dataTypes[0]]?k.accepts[k.dataTypes[0]]+("*"!==k.dataTypes[0]?", "+Jb+"; q=0.01":""):k.accepts["*"]);for(d in k.headers)v.setRequestHeader(d,k.headers[d]);if(k.beforeSend&&(k.beforeSend.call(l,v,k)===!1||2===t))return v.abort();u="abort";for(d in{success:1,error:1,complete:1})v[d](k[d]);if(i=Mb(Ib,k,b,v)){v.readyState=1,h&&n.trigger("ajaxSend",[v,k]),k.async&&k.timeout>0&&(g=setTimeout(function(){v.abort("timeout")},k.timeout));try{t=1,i.send(r,x)}catch(w){if(!(2>t))throw w;x(-1,w)}}else x(-1,"No Transport");function x(a,b,c,d){var j,r,s,u,w,x=b;2!==t&&(t=2,g&&clearTimeout(g),i=void 0,f=d||"",v.readyState=a>0?4:0,j=a>=200&&300>a||304===a,c&&(u=Ob(k,v,c)),u=Pb(k,u,v,j),j?(k.ifModified&&(w=v.getResponseHeader("Last-Modified"),w&&(m.lastModified[e]=w),w=v.getResponseHeader("etag"),w&&(m.etag[e]=w)),204===a||"HEAD"===k.type?x="nocontent":304===a?x="notmodified":(x=u.state,r=u.data,s=u.error,j=!s)):(s=x,(a||!x)&&(x="error",0>a&&(a=0))),v.status=a,v.statusText=(b||x)+"",j?o.resolveWith(l,[r,x,v]):o.rejectWith(l,[v,x,s]),v.statusCode(q),q=void 0,h&&n.trigger(j?"ajaxSuccess":"ajaxError",[v,k,j?r:s]),p.fireWith(l,[v,x]),h&&(n.trigger("ajaxComplete",[v,k]),--m.active||m.event.trigger("ajaxStop")))}return v},getJSON:function(a,b,c){return m.get(a,b,c,"json")},getScript:function(a,b){return m.get(a,void 0,b,"script")}}),m.each(["get","post"],function(a,b){m[b]=function(a,c,d,e){return m.isFunction(c)&&(e=e||d,d=c,c=void 0),m.ajax({url:a,type:b,dataType:e,data:c,success:d})}}),m._evalUrl=function(a){return m.ajax({url:a,type:"GET",dataType:"script",async:!1,global:!1,"throws":!0})},m.fn.extend({wrapAll:function(a){if(m.isFunction(a))return this.each(function(b){m(this).wrapAll(a.call(this,b))});if(this[0]){var b=m(a,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&b.insertBefore(this[0]),b.map(function(){var a=this;while(a.firstChild&&1===a.firstChild.nodeType)a=a.firstChild;return a}).append(this)}return this},wrapInner:function(a){return this.each(m.isFunction(a)?function(b){m(this).wrapInner(a.call(this,b))}:function(){var b=m(this),c=b.contents();c.length?c.wrapAll(a):b.append(a)})},wrap:function(a){var b=m.isFunction(a);return this.each(function(c){m(this).wrapAll(b?a.call(this,c):a)})},unwrap:function(){return this.parent().each(function(){m.nodeName(this,"body")||m(this).replaceWith(this.childNodes)}).end()}}),m.expr.filters.hidden=function(a){return a.offsetWidth<=0&&a.offsetHeight<=0||!k.reliableHiddenOffsets()&&"none"===(a.style&&a.style.display||m.css(a,"display"))},m.expr.filters.visible=function(a){return!m.expr.filters.hidden(a)};var Qb=/%20/g,Rb=/\[\]$/,Sb=/\r?\n/g,Tb=/^(?:submit|button|image|reset|file)$/i,Ub=/^(?:input|select|textarea|keygen)/i;function Vb(a,b,c,d){var e;if(m.isArray(b))m.each(b,function(b,e){c||Rb.test(a)?d(a,e):Vb(a+"["+("object"==typeof e?b:"")+"]",e,c,d)});else if(c||"object"!==m.type(b))d(a,b);else for(e in b)Vb(a+"["+e+"]",b[e],c,d)}m.param=function(a,b){var c,d=[],e=function(a,b){b=m.isFunction(b)?b():null==b?"":b,d[d.length]=encodeURIComponent(a)+"="+encodeURIComponent(b)};if(void 0===b&&(b=m.ajaxSettings&&m.ajaxSettings.traditional),m.isArray(a)||a.jquery&&!m.isPlainObject(a))m.each(a,function(){e(this.name,this.value)});else for(c in a)Vb(c,a[c],b,e);return d.join("&").replace(Qb,"+")},m.fn.extend({serialize:function(){return m.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var a=m.prop(this,"elements");return a?m.makeArray(a):this}).filter(function(){var a=this.type;return this.name&&!m(this).is(":disabled")&&Ub.test(this.nodeName)&&!Tb.test(a)&&(this.checked||!W.test(a))}).map(function(a,b){var c=m(this).val();return null==c?null:m.isArray(c)?m.map(c,function(a){return{name:b.name,value:a.replace(Sb,"\r\n")}}):{name:b.name,value:c.replace(Sb,"\r\n")}}).get()}}),m.ajaxSettings.xhr=void 0!==a.ActiveXObject?function(){return!this.isLocal&&/^(get|post|head|put|delete|options)$/i.test(this.type)&&Zb()||$b()}:Zb;var Wb=0,Xb={},Yb=m.ajaxSettings.xhr();a.attachEvent&&a.attachEvent("onunload",function(){for(var a in Xb)Xb[a](void 0,!0)}),k.cors=!!Yb&&"withCredentials"in Yb,Yb=k.ajax=!!Yb,Yb&&m.ajaxTransport(function(a){if(!a.crossDomain||k.cors){var b;return{send:function(c,d){var e,f=a.xhr(),g=++Wb;if(f.open(a.type,a.url,a.async,a.username,a.password),a.xhrFields)for(e in a.xhrFields)f[e]=a.xhrFields[e];a.mimeType&&f.overrideMimeType&&f.overrideMimeType(a.mimeType),a.crossDomain||c["X-Requested-With"]||(c["X-Requested-With"]="XMLHttpRequest");for(e in c)void 0!==c[e]&&f.setRequestHeader(e,c[e]+"");f.send(a.hasContent&&a.data||null),b=function(c,e){var h,i,j;if(b&&(e||4===f.readyState))if(delete Xb[g],b=void 0,f.onreadystatechange=m.noop,e)4!==f.readyState&&f.abort();else{j={},h=f.status,"string"==typeof f.responseText&&(j.text=f.responseText);try{i=f.statusText}catch(k){i=""}h||!a.isLocal||a.crossDomain?1223===h&&(h=204):h=j.text?200:404}j&&d(h,i,j,f.getAllResponseHeaders())},a.async?4===f.readyState?setTimeout(b):f.onreadystatechange=Xb[g]=b:b()},abort:function(){b&&b(void 0,!0)}}}});function Zb(){try{return new a.XMLHttpRequest}catch(b){}}function $b(){try{return new a.ActiveXObject("Microsoft.XMLHTTP")}catch(b){}}m.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/(?:java|ecma)script/},converters:{"text script":function(a){return m.globalEval(a),a}}}),m.ajaxPrefilter("script",function(a){void 0===a.cache&&(a.cache=!1),a.crossDomain&&(a.type="GET",a.global=!1)}),m.ajaxTransport("script",function(a){if(a.crossDomain){var b,c=y.head||m("head")[0]||y.documentElement;return{send:function(d,e){b=y.createElement("script"),b.async=!0,a.scriptCharset&&(b.charset=a.scriptCharset),b.src=a.url,b.onload=b.onreadystatechange=function(a,c){(c||!b.readyState||/loaded|complete/.test(b.readyState))&&(b.onload=b.onreadystatechange=null,b.parentNode&&b.parentNode.removeChild(b),b=null,c||e(200,"success"))},c.insertBefore(b,c.firstChild)},abort:function(){b&&b.onload(void 0,!0)}}}});var _b=[],ac=/(=)\?(?=&|$)|\?\?/;m.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var a=_b.pop()||m.expando+"_"+vb++;return this[a]=!0,a}}),m.ajaxPrefilter("json jsonp",function(b,c,d){var e,f,g,h=b.jsonp!==!1&&(ac.test(b.url)?"url":"string"==typeof b.data&&!(b.contentType||"").indexOf("application/x-www-form-urlencoded")&&ac.test(b.data)&&"data");return h||"jsonp"===b.dataTypes[0]?(e=b.jsonpCallback=m.isFunction(b.jsonpCallback)?b.jsonpCallback():b.jsonpCallback,h?b[h]=b[h].replace(ac,"$1"+e):b.jsonp!==!1&&(b.url+=(wb.test(b.url)?"&":"?")+b.jsonp+"="+e),b.converters["script json"]=function(){return g||m.error(e+" was not called"),g[0]},b.dataTypes[0]="json",f=a[e],a[e]=function(){g=arguments},d.always(function(){a[e]=f,b[e]&&(b.jsonpCallback=c.jsonpCallback,_b.push(e)),g&&m.isFunction(f)&&f(g[0]),g=f=void 0}),"script"):void 0}),m.parseHTML=function(a,b,c){if(!a||"string"!=typeof a)return null;"boolean"==typeof b&&(c=b,b=!1),b=b||y;var d=u.exec(a),e=!c&&[];return d?[b.createElement(d[1])]:(d=m.buildFragment([a],b,e),e&&e.length&&m(e).remove(),m.merge([],d.childNodes))};var bc=m.fn.load;m.fn.load=function(a,b,c){if("string"!=typeof a&&bc)return bc.apply(this,arguments);var d,e,f,g=this,h=a.indexOf(" ");return h>=0&&(d=m.trim(a.slice(h,a.length)),a=a.slice(0,h)),m.isFunction(b)?(c=b,b=void 0):b&&"object"==typeof b&&(f="POST"),g.length>0&&m.ajax({url:a,type:f,dataType:"html",data:b}).done(function(a){e=arguments,g.html(d?m("<div>").append(m.parseHTML(a)).find(d):a)}).complete(c&&function(a,b){g.each(c,e||[a.responseText,b,a])}),this},m.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(a,b){m.fn[b]=function(a){return this.on(b,a)}}),m.expr.filters.animated=function(a){return m.grep(m.timers,function(b){return a===b.elem}).length};var cc=a.document.documentElement;function dc(a){return m.isWindow(a)?a:9===a.nodeType?a.defaultView||a.parentWindow:!1}m.offset={setOffset:function(a,b,c){var d,e,f,g,h,i,j,k=m.css(a,"position"),l=m(a),n={};"static"===k&&(a.style.position="relative"),h=l.offset(),f=m.css(a,"top"),i=m.css(a,"left"),j=("absolute"===k||"fixed"===k)&&m.inArray("auto",[f,i])>-1,j?(d=l.position(),g=d.top,e=d.left):(g=parseFloat(f)||0,e=parseFloat(i)||0),m.isFunction(b)&&(b=b.call(a,c,h)),null!=b.top&&(n.top=b.top-h.top+g),null!=b.left&&(n.left=b.left-h.left+e),"using"in b?b.using.call(a,n):l.css(n)}},m.fn.extend({offset:function(a){if(arguments.length)return void 0===a?this:this.each(function(b){m.offset.setOffset(this,a,b)});var b,c,d={top:0,left:0},e=this[0],f=e&&e.ownerDocument;if(f)return b=f.documentElement,m.contains(b,e)?(typeof e.getBoundingClientRect!==K&&(d=e.getBoundingClientRect()),c=dc(f),{top:d.top+(c.pageYOffset||b.scrollTop)-(b.clientTop||0),left:d.left+(c.pageXOffset||b.scrollLeft)-(b.clientLeft||0)}):d},position:function(){if(this[0]){var a,b,c={top:0,left:0},d=this[0];return"fixed"===m.css(d,"position")?b=d.getBoundingClientRect():(a=this.offsetParent(),b=this.offset(),m.nodeName(a[0],"html")||(c=a.offset()),c.top+=m.css(a[0],"borderTopWidth",!0),c.left+=m.css(a[0],"borderLeftWidth",!0)),{top:b.top-c.top-m.css(d,"marginTop",!0),left:b.left-c.left-m.css(d,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){var a=this.offsetParent||cc;while(a&&!m.nodeName(a,"html")&&"static"===m.css(a,"position"))a=a.offsetParent;return a||cc})}}),m.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(a,b){var c=/Y/.test(b);m.fn[a]=function(d){return V(this,function(a,d,e){var f=dc(a);return void 0===e?f?b in f?f[b]:f.document.documentElement[d]:a[d]:void(f?f.scrollTo(c?m(f).scrollLeft():e,c?e:m(f).scrollTop()):a[d]=e)},a,d,arguments.length,null)}}),m.each(["top","left"],function(a,b){m.cssHooks[b]=La(k.pixelPosition,function(a,c){return c?(c=Ja(a,b),Ha.test(c)?m(a).position()[b]+"px":c):void 0})}),m.each({Height:"height",Width:"width"},function(a,b){m.each({padding:"inner"+a,content:b,"":"outer"+a},function(c,d){m.fn[d]=function(d,e){var f=arguments.length&&(c||"boolean"!=typeof d),g=c||(d===!0||e===!0?"margin":"border");return V(this,function(b,c,d){var e;return m.isWindow(b)?b.document.documentElement["client"+a]:9===b.nodeType?(e=b.documentElement,Math.max(b.body["scroll"+a],e["scroll"+a],b.body["offset"+a],e["offset"+a],e["client"+a])):void 0===d?m.css(b,c,g):m.style(b,c,d,g)},b,f?d:void 0,f,null)}})}),m.fn.size=function(){return this.length},m.fn.andSelf=m.fn.addBack,"function"==typeof define&&define.amd&&define("jquery",[],function(){return m});var ec=a.jQuery,fc=a.$;return m.noConflict=function(b){return a.$===m&&(a.$=fc),b&&a.jQuery===m&&(a.jQuery=ec),m},typeof b===K&&(a.jQuery=a.$=m),m});
/**********************************************************************jQuery v1.11.3*********************************************************************************************/

/**********************************************************************图片懒加载*********************************************************************************************/
/*
 * Lazy Load - jQuery plugin for lazy loading images
 *
 * Copyright (c) 2007-2013 Mika Tuupola
 *
 * Licensed under the MIT license:
 *   http://www.opensource.org/licenses/mit-license.php
 *
 * Project home:
 *   http://www.appelsiini.net/projects/lazyload
 *
 * Version:  1.9.3
 *
 */

(function($, window, document, undefined) {
    var $window = $(window);

    $.fn.lazyload = function(options) {
        var elements = this;
        var $container;
        var settings = {
            threshold       : 0,
            failure_limit   : 0,
            event           : "scroll",
            effect          : "show",
            container       : window,
            data_attribute  : "original",
            skip_invisible  : true,
            appear          : null,
            load            : null,
            placeholder     : ""
        };

        function update() {
            var counter = 0;

            elements.each(function() {
                var $this = $(this);
                if (settings.skip_invisible && !$this.is(":visible")) {
                    return;
                }
                if ($.abovethetop(this, settings) ||
                    $.leftofbegin(this, settings)) {
                        /* Nothing. */
                } else if (!$.belowthefold(this, settings) &&
                    !$.rightoffold(this, settings)) {
                        $this.trigger("appear");
                        /* if we found an image we'll load, reset the counter */
                        counter = 0;
                } else {
                    if (++counter > settings.failure_limit) {
                        return false;
                    }
                }
            });

        }

        if(options) {
            /* Maintain BC for a couple of versions. */
            if (undefined !== options.failurelimit) {
                options.failure_limit = options.failurelimit;
                delete options.failurelimit;
            }
            if (undefined !== options.effectspeed) {
                options.effect_speed = options.effectspeed;
                delete options.effectspeed;
            }

            $.extend(settings, options);
        }

        /* Cache container as jQuery as object. */
        $container = (settings.container === undefined ||
                      settings.container === window) ? $window : $(settings.container);

        /* Fire one scroll event per scroll. Not one scroll event per image. */
        if (0 === settings.event.indexOf("scroll")) {
            $container.bind(settings.event, function() {
                return update();
            });
        }

        this.each(function() {
            var self = this;
            var $self = $(self);

            self.loaded = false;

            /* If no src attribute given use data:uri. */
            if ($self.attr("src") === undefined || $self.attr("src") === false) {
                if ($self.is("img")) {
                    $self.attr("src", settings.placeholder);
                }
            }

            /* When appear is triggered load original image. */
            $self.one("appear", function() {
                if (!this.loaded) {
                    if (settings.appear) {
                        var elements_left = elements.length;
                        settings.appear.call(self, elements_left, settings);
                    }
                    $("<img />")
                        .bind("load", function() {

                            var original = $self.attr("data-" + settings.data_attribute);
                            $self.hide();
                            if ($self.is("img")) {
                                $self.attr("src", original);
                            } else {
                                $self.css("background-image", "url('" + original + "')");
                            }
                            $self[settings.effect](settings.effect_speed);

                            self.loaded = true;

                            /* Remove image from array so it is not looped next time. */
                            var temp = $.grep(elements, function(element) {
                                return !element.loaded;
                            });
                            elements = $(temp);

                            if (settings.load) {
                                var elements_left = elements.length;
                                settings.load.call(self, elements_left, settings);
                            }
                        })
                        .attr("src", $self.attr("data-" + settings.data_attribute));
                }
            });

            /* When wanted event is triggered load original image */
            /* by triggering appear.                              */
            if (0 !== settings.event.indexOf("scroll")) {
                $self.bind(settings.event, function() {
                    if (!self.loaded) {
                        $self.trigger("appear");
                    }
                });
            }
        });

        /* Check if something appears when window is resized. */
        $window.bind("resize", function() {
            update();
        });

        /* With IOS5 force loading images when navigating with back button. */
        /* Non optimal workaround. */
        if ((/(?:iphone|ipod|ipad).*os 5/gi).test(navigator.appVersion)) {
            $window.bind("pageshow", function(event) {
                if (event.originalEvent && event.originalEvent.persisted) {
                    elements.each(function() {
                        $(this).trigger("appear");
                    });
                }
            });
        }

        /* Force initial check if images should appear. */
        $(document).ready(function() {
            update();
        });

        return this;
    };

    /* Convenience methods in jQuery namespace.           */
    /* Use as  $.belowthefold(element, {threshold : 100, container : window}) */

    $.belowthefold = function(element, settings) {
        var fold;

        if (settings.container === undefined || settings.container === window) {
            fold = (window.innerHeight ? window.innerHeight : $window.height()) + $window.scrollTop();
        } else {
            fold = $(settings.container).offset().top + $(settings.container).height();
        }

        return fold <= $(element).offset().top - settings.threshold;
    };

    $.rightoffold = function(element, settings) {
        var fold;

        if (settings.container === undefined || settings.container === window) {
            fold = $window.width() + $window.scrollLeft();
        } else {
            fold = $(settings.container).offset().left + $(settings.container).width();
        }

        return fold <= $(element).offset().left - settings.threshold;
    };

    $.abovethetop = function(element, settings) {
        var fold;

        if (settings.container === undefined || settings.container === window) {
            fold = $window.scrollTop();
        } else {
            fold = $(settings.container).offset().top;
        }

        return fold >= $(element).offset().top + settings.threshold  + $(element).height();
    };

    $.leftofbegin = function(element, settings) {
        var fold;

        if (settings.container === undefined || settings.container === window) {
            fold = $window.scrollLeft();
        } else {
            fold = $(settings.container).offset().left;
        }

        return fold >= $(element).offset().left + settings.threshold + $(element).width();
    };

    $.inviewport = function(element, settings) {
         return !$.rightoffold(element, settings) && !$.leftofbegin(element, settings) &&
                !$.belowthefold(element, settings) && !$.abovethetop(element, settings);
     };

    /* Custom selectors for your convenience.   */
    /* Use as $("img:below-the-fold").something() or */
    /* $("img").filter(":below-the-fold").something() which is faster */

    $.extend($.expr[":"], {
        "below-the-fold" : function(a) { return $.belowthefold(a, {threshold : 0}); },
        "above-the-top"  : function(a) { return !$.belowthefold(a, {threshold : 0}); },
        "right-of-screen": function(a) { return $.rightoffold(a, {threshold : 0}); },
        "left-of-screen" : function(a) { return !$.rightoffold(a, {threshold : 0}); },
        "in-viewport"    : function(a) { return $.inviewport(a, {threshold : 0}); },
        /* Maintain BC for couple of versions. */
        "above-the-fold" : function(a) { return !$.belowthefold(a, {threshold : 0}); },
        "right-of-fold"  : function(a) { return $.rightoffold(a, {threshold : 0}); },
        "left-of-fold"   : function(a) { return !$.rightoffold(a, {threshold : 0}); }
    });

})(jQuery, window, document);
/**********************************************************************图片懒加载***********************************************************************/

/**********************************************************************Swiper  2.7.6***********************************************************************/

/*
 * Swiper 2.7.6
 * Mobile touch slider and framework with hardware accelerated transitions
 *
 * http://www.idangero.us/sliders/swiper/
 *
 * Copyright 2010-2015, Vladimir Kharlampidi
 * The iDangero.us
 * http://www.idangero.us/
 *
 * Licensed under GPL & MIT
 *
 * Released on: February 11, 2015
*/
var Swiper=function(a,b){"use strict";function c(a,b){return document.querySelectorAll?(b||document).querySelectorAll(a):jQuery(a,b)}function d(a){return"[object Array]"===Object.prototype.toString.apply(a)?!0:!1}function e(){var a=G-J;return b.freeMode&&(a=G-J),b.slidesPerView>D.slides.length&&!b.centeredSlides&&(a=0),0>a&&(a=0),a}function f(){function a(a){var c,d,e=function(){"undefined"!=typeof D&&null!==D&&(void 0!==D.imagesLoaded&&D.imagesLoaded++,D.imagesLoaded===D.imagesToLoad.length&&(D.reInit(),b.onImagesReady&&D.fireCallback(b.onImagesReady,D)))};a.complete?e():(d=a.currentSrc||a.getAttribute("src"),d?(c=new Image,c.onload=e,c.onerror=e,c.src=d):e())}var d=D.h.addEventListener,e="wrapper"===b.eventTarget?D.wrapper:D.container;if(D.browser.ie10||D.browser.ie11?(d(e,D.touchEvents.touchStart,p),d(document,D.touchEvents.touchMove,q),d(document,D.touchEvents.touchEnd,r)):(D.support.touch&&(d(e,"touchstart",p),d(e,"touchmove",q),d(e,"touchend",r)),b.simulateTouch&&(d(e,"mousedown",p),d(document,"mousemove",q),d(document,"mouseup",r))),b.autoResize&&d(window,"resize",D.resizeFix),g(),D._wheelEvent=!1,b.mousewheelControl){if(void 0!==document.onmousewheel&&(D._wheelEvent="mousewheel"),!D._wheelEvent)try{new WheelEvent("wheel"),D._wheelEvent="wheel"}catch(f){}D._wheelEvent||(D._wheelEvent="DOMMouseScroll"),D._wheelEvent&&d(D.container,D._wheelEvent,j)}if(b.keyboardControl&&d(document,"keydown",i),b.updateOnImagesReady){D.imagesToLoad=c("img",D.container);for(var h=0;h<D.imagesToLoad.length;h++)a(D.imagesToLoad[h])}}function g(){var a,d=D.h.addEventListener;if(b.preventLinks){var e=c("a",D.container);for(a=0;a<e.length;a++)d(e[a],"click",n)}if(b.releaseFormElements){var f=c("input, textarea, select",D.container);for(a=0;a<f.length;a++)d(f[a],D.touchEvents.touchStart,o,!0),D.support.touch&&b.simulateTouch&&d(f[a],"mousedown",o,!0)}if(b.onSlideClick)for(a=0;a<D.slides.length;a++)d(D.slides[a],"click",k);if(b.onSlideTouch)for(a=0;a<D.slides.length;a++)d(D.slides[a],D.touchEvents.touchStart,l)}function h(){var a,d=D.h.removeEventListener;if(b.onSlideClick)for(a=0;a<D.slides.length;a++)d(D.slides[a],"click",k);if(b.onSlideTouch)for(a=0;a<D.slides.length;a++)d(D.slides[a],D.touchEvents.touchStart,l);if(b.releaseFormElements){var e=c("input, textarea, select",D.container);for(a=0;a<e.length;a++)d(e[a],D.touchEvents.touchStart,o,!0),D.support.touch&&b.simulateTouch&&d(e[a],"mousedown",o,!0)}if(b.preventLinks){var f=c("a",D.container);for(a=0;a<f.length;a++)d(f[a],"click",n)}}function i(a){var b=a.keyCode||a.charCode;if(!(a.shiftKey||a.altKey||a.ctrlKey||a.metaKey)){if(37===b||39===b||38===b||40===b){for(var c=!1,d=D.h.getOffset(D.container),e=D.h.windowScroll().left,f=D.h.windowScroll().top,g=D.h.windowWidth(),h=D.h.windowHeight(),i=[[d.left,d.top],[d.left+D.width,d.top],[d.left,d.top+D.height],[d.left+D.width,d.top+D.height]],j=0;j<i.length;j++){var k=i[j];k[0]>=e&&k[0]<=e+g&&k[1]>=f&&k[1]<=f+h&&(c=!0)}if(!c)return}N?((37===b||39===b)&&(a.preventDefault?a.preventDefault():a.returnValue=!1),39===b&&D.swipeNext(),37===b&&D.swipePrev()):((38===b||40===b)&&(a.preventDefault?a.preventDefault():a.returnValue=!1),40===b&&D.swipeNext(),38===b&&D.swipePrev())}}function j(a){var c=D._wheelEvent,d=0;if(a.detail)d=-a.detail;else if("mousewheel"===c)if(b.mousewheelControlForceToAxis)if(N){if(!(Math.abs(a.wheelDeltaX)>Math.abs(a.wheelDeltaY)))return;d=a.wheelDeltaX}else{if(!(Math.abs(a.wheelDeltaY)>Math.abs(a.wheelDeltaX)))return;d=a.wheelDeltaY}else d=a.wheelDelta;else if("DOMMouseScroll"===c)d=-a.detail;else if("wheel"===c)if(b.mousewheelControlForceToAxis)if(N){if(!(Math.abs(a.deltaX)>Math.abs(a.deltaY)))return;d=-a.deltaX}else{if(!(Math.abs(a.deltaY)>Math.abs(a.deltaX)))return;d=-a.deltaY}else d=Math.abs(a.deltaX)>Math.abs(a.deltaY)?-a.deltaX:-a.deltaY;if(b.freeMode){var f=D.getWrapperTranslate()+d;if(f>0&&(f=0),f<-e()&&(f=-e()),D.setWrapperTransition(0),D.setWrapperTranslate(f),D.updateActiveSlide(f),0===f||f===-e())return}else(new Date).getTime()-V>60&&(0>d?D.swipeNext():D.swipePrev()),V=(new Date).getTime();return b.autoplay&&D.stopAutoplay(!0),a.preventDefault?a.preventDefault():a.returnValue=!1,!1}function k(a){D.allowSlideClick&&(m(a),D.fireCallback(b.onSlideClick,D,a))}function l(a){m(a),D.fireCallback(b.onSlideTouch,D,a)}function m(a){if(a.currentTarget)D.clickedSlide=a.currentTarget;else{var c=a.srcElement;do{if(c.className.indexOf(b.slideClass)>-1)break;c=c.parentNode}while(c);D.clickedSlide=c}D.clickedSlideIndex=D.slides.indexOf(D.clickedSlide),D.clickedSlideLoopIndex=D.clickedSlideIndex-(D.loopedSlides||0)}function n(a){return D.allowLinks?void 0:(a.preventDefault?a.preventDefault():a.returnValue=!1,b.preventLinksPropagation&&"stopPropagation"in a&&a.stopPropagation(),!1)}function o(a){return a.stopPropagation?a.stopPropagation():a.returnValue=!1,!1}function p(a){if(b.preventLinks&&(D.allowLinks=!0),D.isTouched||b.onlyExternal)return!1;var c=a.target||a.srcElement;document.activeElement&&document.activeElement!==document.body&&document.activeElement!==c&&document.activeElement.blur();var d="input select textarea".split(" ");if(b.noSwiping&&c&&t(c))return!1;if(_=!1,D.isTouched=!0,$="touchstart"===a.type,!$&&"which"in a&&3===a.which)return D.isTouched=!1,!1;if(!$||1===a.targetTouches.length){D.callPlugins("onTouchStartBegin"),!$&&!D.isAndroid&&d.indexOf(c.tagName.toLowerCase())<0&&(a.preventDefault?a.preventDefault():a.returnValue=!1);var e=$?a.targetTouches[0].pageX:a.pageX||a.clientX,f=$?a.targetTouches[0].pageY:a.pageY||a.clientY;D.touches.startX=D.touches.currentX=e,D.touches.startY=D.touches.currentY=f,D.touches.start=D.touches.current=N?e:f,D.setWrapperTransition(0),D.positions.start=D.positions.current=D.getWrapperTranslate(),D.setWrapperTranslate(D.positions.start),D.times.start=(new Date).getTime(),I=void 0,b.moveStartThreshold>0&&(X=!1),b.onTouchStart&&D.fireCallback(b.onTouchStart,D,a),D.callPlugins("onTouchStartEnd")}}function q(a){if(D.isTouched&&!b.onlyExternal&&(!$||"mousemove"!==a.type)){var c=$?a.targetTouches[0].pageX:a.pageX||a.clientX,d=$?a.targetTouches[0].pageY:a.pageY||a.clientY;if("undefined"==typeof I&&N&&(I=!!(I||Math.abs(d-D.touches.startY)>Math.abs(c-D.touches.startX))),"undefined"!=typeof I||N||(I=!!(I||Math.abs(d-D.touches.startY)<Math.abs(c-D.touches.startX))),I)return void(D.isTouched=!1);if(N){if(!b.swipeToNext&&c<D.touches.startX||!b.swipeToPrev&&c>D.touches.startX)return}else if(!b.swipeToNext&&d<D.touches.startY||!b.swipeToPrev&&d>D.touches.startY)return;if(a.assignedToSwiper)return void(D.isTouched=!1);if(a.assignedToSwiper=!0,b.preventLinks&&(D.allowLinks=!1),b.onSlideClick&&(D.allowSlideClick=!1),b.autoplay&&D.stopAutoplay(!0),!$||1===a.touches.length){if(D.isMoved||(D.callPlugins("onTouchMoveStart"),b.loop&&(D.fixLoop(),D.positions.start=D.getWrapperTranslate()),b.onTouchMoveStart&&D.fireCallback(b.onTouchMoveStart,D)),D.isMoved=!0,a.preventDefault?a.preventDefault():a.returnValue=!1,D.touches.current=N?c:d,D.positions.current=(D.touches.current-D.touches.start)*b.touchRatio+D.positions.start,D.positions.current>0&&b.onResistanceBefore&&D.fireCallback(b.onResistanceBefore,D,D.positions.current),D.positions.current<-e()&&b.onResistanceAfter&&D.fireCallback(b.onResistanceAfter,D,Math.abs(D.positions.current+e())),b.resistance&&"100%"!==b.resistance){var f;if(D.positions.current>0&&(f=1-D.positions.current/J/2,D.positions.current=.5>f?J/2:D.positions.current*f),D.positions.current<-e()){var g=(D.touches.current-D.touches.start)*b.touchRatio+(e()+D.positions.start);f=(J+g)/J;var h=D.positions.current-g*(1-f)/2,i=-e()-J/2;D.positions.current=i>h||0>=f?i:h}}if(b.resistance&&"100%"===b.resistance&&(D.positions.current>0&&(!b.freeMode||b.freeModeFluid)&&(D.positions.current=0),D.positions.current<-e()&&(!b.freeMode||b.freeModeFluid)&&(D.positions.current=-e())),!b.followFinger)return;if(b.moveStartThreshold)if(Math.abs(D.touches.current-D.touches.start)>b.moveStartThreshold||X){if(!X)return X=!0,void(D.touches.start=D.touches.current);D.setWrapperTranslate(D.positions.current)}else D.positions.current=D.positions.start;else D.setWrapperTranslate(D.positions.current);return(b.freeMode||b.watchActiveIndex)&&D.updateActiveSlide(D.positions.current),b.grabCursor&&(D.container.style.cursor="move",D.container.style.cursor="grabbing",D.container.style.cursor="-moz-grabbin",D.container.style.cursor="-webkit-grabbing"),Y||(Y=D.touches.current),Z||(Z=(new Date).getTime()),D.velocity=(D.touches.current-Y)/((new Date).getTime()-Z)/2,Math.abs(D.touches.current-Y)<2&&(D.velocity=0),Y=D.touches.current,Z=(new Date).getTime(),D.callPlugins("onTouchMoveEnd"),b.onTouchMove&&D.fireCallback(b.onTouchMove,D,a),!1}}}function r(a){if(I&&D.swipeReset(),!b.onlyExternal&&D.isTouched){D.isTouched=!1,b.grabCursor&&(D.container.style.cursor="move",D.container.style.cursor="grab",D.container.style.cursor="-moz-grab",D.container.style.cursor="-webkit-grab"),D.positions.current||0===D.positions.current||(D.positions.current=D.positions.start),b.followFinger&&D.setWrapperTranslate(D.positions.current),D.times.end=(new Date).getTime(),D.touches.diff=D.touches.current-D.touches.start,D.touches.abs=Math.abs(D.touches.diff),D.positions.diff=D.positions.current-D.positions.start,D.positions.abs=Math.abs(D.positions.diff);var c=D.positions.diff,d=D.positions.abs,f=D.times.end-D.times.start;5>d&&300>f&&D.allowLinks===!1&&(b.freeMode||0===d||D.swipeReset(),b.preventLinks&&(D.allowLinks=!0),b.onSlideClick&&(D.allowSlideClick=!0)),setTimeout(function(){"undefined"!=typeof D&&null!==D&&(b.preventLinks&&(D.allowLinks=!0),b.onSlideClick&&(D.allowSlideClick=!0))},100);var g=e();if(!D.isMoved&&b.freeMode)return D.isMoved=!1,b.onTouchEnd&&D.fireCallback(b.onTouchEnd,D,a),void D.callPlugins("onTouchEnd");if(!D.isMoved||D.positions.current>0||D.positions.current<-g)return D.swipeReset(),b.onTouchEnd&&D.fireCallback(b.onTouchEnd,D,a),void D.callPlugins("onTouchEnd");if(D.isMoved=!1,b.freeMode){if(b.freeModeFluid){var h,i=1e3*b.momentumRatio,j=D.velocity*i,k=D.positions.current+j,l=!1,m=20*Math.abs(D.velocity)*b.momentumBounceRatio;-g>k&&(b.momentumBounce&&D.support.transitions?(-m>k+g&&(k=-g-m),h=-g,l=!0,_=!0):k=-g),k>0&&(b.momentumBounce&&D.support.transitions?(k>m&&(k=m),h=0,l=!0,_=!0):k=0),0!==D.velocity&&(i=Math.abs((k-D.positions.current)/D.velocity)),D.setWrapperTranslate(k),D.setWrapperTransition(i),b.momentumBounce&&l&&D.wrapperTransitionEnd(function(){_&&(b.onMomentumBounce&&D.fireCallback(b.onMomentumBounce,D),D.callPlugins("onMomentumBounce"),D.setWrapperTranslate(h),D.setWrapperTransition(300))}),D.updateActiveSlide(k)}return(!b.freeModeFluid||f>=300)&&D.updateActiveSlide(D.positions.current),b.onTouchEnd&&D.fireCallback(b.onTouchEnd,D,a),void D.callPlugins("onTouchEnd")}H=0>c?"toNext":"toPrev","toNext"===H&&300>=f&&(30>d||!b.shortSwipes?D.swipeReset():D.swipeNext(!0,!0)),"toPrev"===H&&300>=f&&(30>d||!b.shortSwipes?D.swipeReset():D.swipePrev(!0,!0));var n=0;if("auto"===b.slidesPerView){for(var o,p=Math.abs(D.getWrapperTranslate()),q=0,r=0;r<D.slides.length;r++)if(o=N?D.slides[r].getWidth(!0,b.roundLengths):D.slides[r].getHeight(!0,b.roundLengths),q+=o,q>p){n=o;break}n>J&&(n=J)}else n=F*b.slidesPerView;"toNext"===H&&f>300&&(d>=n*b.longSwipesRatio?D.swipeNext(!0,!0):D.swipeReset()),"toPrev"===H&&f>300&&(d>=n*b.longSwipesRatio?D.swipePrev(!0,!0):D.swipeReset()),b.onTouchEnd&&D.fireCallback(b.onTouchEnd,D,a),D.callPlugins("onTouchEnd")}}function s(a,b){return a&&a.getAttribute("class")&&a.getAttribute("class").indexOf(b)>-1}function t(a){var c=!1;do s(a,b.noSwipingClass)&&(c=!0),a=a.parentElement;while(!c&&a.parentElement&&!s(a,b.wrapperClass));return!c&&s(a,b.wrapperClass)&&s(a,b.noSwipingClass)&&(c=!0),c}function u(a,b){var c,d=document.createElement("div");return d.innerHTML=b,c=d.firstChild,c.className+=" "+a,c.outerHTML}function v(a,c,d){function e(){var f=+new Date,l=f-g;h+=i*l/(1e3/60),k="toNext"===j?h>a:a>h,k?(D.setWrapperTranslate(Math.ceil(h)),D._DOMAnimating=!0,window.setTimeout(function(){e()},1e3/60)):(b.onSlideChangeEnd&&("to"===c?d.runCallbacks===!0&&D.fireCallback(b.onSlideChangeEnd,D,j):D.fireCallback(b.onSlideChangeEnd,D,j)),D.setWrapperTranslate(a),D._DOMAnimating=!1)}var f="to"===c&&d.speed>=0?d.speed:b.speed,g=+new Date;if(D.support.transitions||!b.DOMAnimation)D.setWrapperTranslate(a),D.setWrapperTransition(f);else{var h=D.getWrapperTranslate(),i=Math.ceil((a-h)/f*(1e3/60)),j=h>a?"toNext":"toPrev",k="toNext"===j?h>a:a>h;if(D._DOMAnimating)return;e()}D.updateActiveSlide(a),b.onSlideNext&&"next"===c&&d.runCallbacks===!0&&D.fireCallback(b.onSlideNext,D,a),b.onSlidePrev&&"prev"===c&&d.runCallbacks===!0&&D.fireCallback(b.onSlidePrev,D,a),b.onSlideReset&&"reset"===c&&d.runCallbacks===!0&&D.fireCallback(b.onSlideReset,D,a),"next"!==c&&"prev"!==c&&"to"!==c||d.runCallbacks!==!0||w(c)}function w(a){if(D.callPlugins("onSlideChangeStart"),b.onSlideChangeStart)if(b.queueStartCallbacks&&D.support.transitions){if(D._queueStartCallbacks)return;D._queueStartCallbacks=!0,D.fireCallback(b.onSlideChangeStart,D,a),D.wrapperTransitionEnd(function(){D._queueStartCallbacks=!1})}else D.fireCallback(b.onSlideChangeStart,D,a);if(b.onSlideChangeEnd)if(D.support.transitions)if(b.queueEndCallbacks){if(D._queueEndCallbacks)return;D._queueEndCallbacks=!0,D.wrapperTransitionEnd(function(c){D.fireCallback(b.onSlideChangeEnd,c,a)})}else D.wrapperTransitionEnd(function(c){D.fireCallback(b.onSlideChangeEnd,c,a)});else b.DOMAnimation||setTimeout(function(){D.fireCallback(b.onSlideChangeEnd,D,a)},10)}function x(){var a=D.paginationButtons;if(a)for(var b=0;b<a.length;b++)D.h.removeEventListener(a[b],"click",z)}function y(){var a=D.paginationButtons;if(a)for(var b=0;b<a.length;b++)D.h.addEventListener(a[b],"click",z)}function z(a){for(var c,d=a.target||a.srcElement,e=D.paginationButtons,f=0;f<e.length;f++)d===e[f]&&(c=f);b.autoplay&&D.stopAutoplay(!0),D.swipeTo(c)}function A(){ab=setTimeout(function(){b.loop?(D.fixLoop(),D.swipeNext(!0,!0)):D.swipeNext(!0,!0)||(b.autoplayStopOnLast?(clearTimeout(ab),ab=void 0):D.swipeTo(0)),D.wrapperTransitionEnd(function(){"undefined"!=typeof ab&&A()})},b.autoplay)}function B(){D.calcSlides(),b.loader.slides.length>0&&0===D.slides.length&&D.loadSlides(),b.loop&&D.createLoop(),D.init(),f(),b.pagination&&D.createPagination(!0),b.loop||b.initialSlide>0?D.swipeTo(b.initialSlide,0,!1):D.updateActiveSlide(0),b.autoplay&&D.startAutoplay(),D.centerIndex=D.activeIndex,b.onSwiperCreated&&D.fireCallback(b.onSwiperCreated,D),D.callPlugins("onSwiperCreated")}if(!document.body.outerHTML&&document.body.__defineGetter__&&HTMLElement){var C=HTMLElement.prototype;C.__defineGetter__&&C.__defineGetter__("outerHTML",function(){return(new XMLSerializer).serializeToString(this)})}if(window.getComputedStyle||(window.getComputedStyle=function(a){return this.el=a,this.getPropertyValue=function(b){var c=/(\-([a-z]){1})/g;return"float"===b&&(b="styleFloat"),c.test(b)&&(b=b.replace(c,function(){return arguments[2].toUpperCase()})),a.currentStyle[b]?a.currentStyle[b]:null},this}),Array.prototype.indexOf||(Array.prototype.indexOf=function(a,b){for(var c=b||0,d=this.length;d>c;c++)if(this[c]===a)return c;return-1}),(document.querySelectorAll||window.jQuery)&&"undefined"!=typeof a&&(a.nodeType||0!==c(a).length)){var D=this;D.touches={start:0,startX:0,startY:0,current:0,currentX:0,currentY:0,diff:0,abs:0},D.positions={start:0,abs:0,diff:0,current:0},D.times={start:0,end:0},D.id=(new Date).getTime(),D.container=a.nodeType?a:c(a)[0],D.isTouched=!1,D.isMoved=!1,D.activeIndex=0,D.centerIndex=0,D.activeLoaderIndex=0,D.activeLoopIndex=0,D.previousIndex=null,D.velocity=0,D.snapGrid=[],D.slidesGrid=[],D.imagesToLoad=[],D.imagesLoaded=0,D.wrapperLeft=0,D.wrapperRight=0,D.wrapperTop=0,D.wrapperBottom=0,D.isAndroid=navigator.userAgent.toLowerCase().indexOf("android")>=0;var E,F,G,H,I,J,K={eventTarget:"wrapper",mode:"horizontal",touchRatio:1,speed:300,freeMode:!1,freeModeFluid:!1,momentumRatio:1,momentumBounce:!0,momentumBounceRatio:1,slidesPerView:1,slidesPerGroup:1,slidesPerViewFit:!0,simulateTouch:!0,followFinger:!0,shortSwipes:!0,longSwipesRatio:.5,moveStartThreshold:!1,onlyExternal:!1,createPagination:!0,pagination:!1,paginationElement:"span",paginationClickable:!1,paginationAsRange:!0,resistance:!0,scrollContainer:!1,preventLinks:!0,preventLinksPropagation:!1,noSwiping:!1,noSwipingClass:"swiper-no-swiping",initialSlide:0,keyboardControl:!1,mousewheelControl:!1,mousewheelControlForceToAxis:!1,useCSS3Transforms:!0,autoplay:!1,autoplayDisableOnInteraction:!0,autoplayStopOnLast:!1,loop:!1,loopAdditionalSlides:0,roundLengths:!1,calculateHeight:!1,cssWidthAndHeight:!1,updateOnImagesReady:!0,releaseFormElements:!0,watchActiveIndex:!1,visibilityFullFit:!1,offsetPxBefore:0,offsetPxAfter:0,offsetSlidesBefore:0,offsetSlidesAfter:0,centeredSlides:!1,queueStartCallbacks:!1,queueEndCallbacks:!1,autoResize:!0,resizeReInit:!1,DOMAnimation:!0,loader:{slides:[],slidesHTMLType:"inner",surroundGroups:1,logic:"reload",loadAllSlides:!1},swipeToPrev:!0,swipeToNext:!0,slideElement:"div",slideClass:"swiper-slide",slideActiveClass:"swiper-slide-active",slideVisibleClass:"swiper-slide-visible",slideDuplicateClass:"swiper-slide-duplicate",wrapperClass:"swiper-wrapper",paginationElementClass:"swiper-pagination-switch",paginationActiveClass:"swiper-active-switch",paginationVisibleClass:"swiper-visible-switch"};b=b||{};for(var L in K)if(L in b&&"object"==typeof b[L])for(var M in K[L])M in b[L]||(b[L][M]=K[L][M]);else L in b||(b[L]=K[L]);D.params=b,b.scrollContainer&&(b.freeMode=!0,b.freeModeFluid=!0),b.loop&&(b.resistance="100%");var N="horizontal"===b.mode,O=["mousedown","mousemove","mouseup"];D.browser.ie10&&(O=["MSPointerDown","MSPointerMove","MSPointerUp"]),D.browser.ie11&&(O=["pointerdown","pointermove","pointerup"]),D.touchEvents={touchStart:D.support.touch||!b.simulateTouch?"touchstart":O[0],touchMove:D.support.touch||!b.simulateTouch?"touchmove":O[1],touchEnd:D.support.touch||!b.simulateTouch?"touchend":O[2]};for(var P=D.container.childNodes.length-1;P>=0;P--)if(D.container.childNodes[P].className)for(var Q=D.container.childNodes[P].className.split(/\s+/),R=0;R<Q.length;R++)Q[R]===b.wrapperClass&&(E=D.container.childNodes[P]);D.wrapper=E,D._extendSwiperSlide=function(a){return a.append=function(){return b.loop?a.insertAfter(D.slides.length-D.loopedSlides):(D.wrapper.appendChild(a),D.reInit()),a},a.prepend=function(){return b.loop?(D.wrapper.insertBefore(a,D.slides[D.loopedSlides]),D.removeLoopedSlides(),D.calcSlides(),D.createLoop()):D.wrapper.insertBefore(a,D.wrapper.firstChild),D.reInit(),a},a.insertAfter=function(c){if("undefined"==typeof c)return!1;var d;return b.loop?(d=D.slides[c+1+D.loopedSlides],d?D.wrapper.insertBefore(a,d):D.wrapper.appendChild(a),D.removeLoopedSlides(),D.calcSlides(),D.createLoop()):(d=D.slides[c+1],D.wrapper.insertBefore(a,d)),D.reInit(),a},a.clone=function(){return D._extendSwiperSlide(a.cloneNode(!0))},a.remove=function(){D.wrapper.removeChild(a),D.reInit()},a.html=function(b){return"undefined"==typeof b?a.innerHTML:(a.innerHTML=b,a)},a.index=function(){for(var b,c=D.slides.length-1;c>=0;c--)a===D.slides[c]&&(b=c);return b},a.isActive=function(){return a.index()===D.activeIndex?!0:!1},a.swiperSlideDataStorage||(a.swiperSlideDataStorage={}),a.getData=function(b){return a.swiperSlideDataStorage[b]},a.setData=function(b,c){return a.swiperSlideDataStorage[b]=c,a},a.data=function(b,c){return"undefined"==typeof c?a.getAttribute("data-"+b):(a.setAttribute("data-"+b,c),a)},a.getWidth=function(b,c){return D.h.getWidth(a,b,c)},a.getHeight=function(b,c){return D.h.getHeight(a,b,c)},a.getOffset=function(){return D.h.getOffset(a)},a},D.calcSlides=function(a){var c=D.slides?D.slides.length:!1;D.slides=[],D.displaySlides=[];for(var d=0;d<D.wrapper.childNodes.length;d++)if(D.wrapper.childNodes[d].className)for(var e=D.wrapper.childNodes[d].className,f=e.split(/\s+/),i=0;i<f.length;i++)f[i]===b.slideClass&&D.slides.push(D.wrapper.childNodes[d]);for(d=D.slides.length-1;d>=0;d--)D._extendSwiperSlide(D.slides[d]);c!==!1&&(c!==D.slides.length||a)&&(h(),g(),D.updateActiveSlide(),D.params.pagination&&D.createPagination(),D.callPlugins("numberOfSlidesChanged"))},D.createSlide=function(a,c,d){c=c||D.params.slideClass,d=d||b.slideElement;var e=document.createElement(d);return e.innerHTML=a||"",e.className=c,D._extendSwiperSlide(e)},D.appendSlide=function(a,b,c){return a?a.nodeType?D._extendSwiperSlide(a).append():D.createSlide(a,b,c).append():void 0},D.prependSlide=function(a,b,c){return a?a.nodeType?D._extendSwiperSlide(a).prepend():D.createSlide(a,b,c).prepend():void 0},D.insertSlideAfter=function(a,b,c,d){return"undefined"==typeof a?!1:b.nodeType?D._extendSwiperSlide(b).insertAfter(a):D.createSlide(b,c,d).insertAfter(a)},D.removeSlide=function(a){if(D.slides[a]){if(b.loop){if(!D.slides[a+D.loopedSlides])return!1;D.slides[a+D.loopedSlides].remove(),D.removeLoopedSlides(),D.calcSlides(),D.createLoop()}else D.slides[a].remove();return!0}return!1},D.removeLastSlide=function(){return D.slides.length>0?(b.loop?(D.slides[D.slides.length-1-D.loopedSlides].remove(),D.removeLoopedSlides(),D.calcSlides(),D.createLoop()):D.slides[D.slides.length-1].remove(),!0):!1},D.removeAllSlides=function(){for(var a=D.slides.length,b=D.slides.length-1;b>=0;b--)D.slides[b].remove(),b===a-1&&D.setWrapperTranslate(0)},D.getSlide=function(a){return D.slides[a]},D.getLastSlide=function(){return D.slides[D.slides.length-1]},D.getFirstSlide=function(){return D.slides[0]},D.activeSlide=function(){return D.slides[D.activeIndex]},D.fireCallback=function(){var a=arguments[0];if("[object Array]"===Object.prototype.toString.call(a))for(var c=0;c<a.length;c++)"function"==typeof a[c]&&a[c](arguments[1],arguments[2],arguments[3],arguments[4],arguments[5]);else"[object String]"===Object.prototype.toString.call(a)?b["on"+a]&&D.fireCallback(b["on"+a],arguments[1],arguments[2],arguments[3],arguments[4],arguments[5]):a(arguments[1],arguments[2],arguments[3],arguments[4],arguments[5])},D.addCallback=function(a,b){var c,e=this;return e.params["on"+a]?d(this.params["on"+a])?this.params["on"+a].push(b):"function"==typeof this.params["on"+a]?(c=this.params["on"+a],this.params["on"+a]=[],this.params["on"+a].push(c),this.params["on"+a].push(b)):void 0:(this.params["on"+a]=[],this.params["on"+a].push(b))},D.removeCallbacks=function(a){D.params["on"+a]&&(D.params["on"+a]=null)};var S=[];for(var T in D.plugins)if(b[T]){var U=D.plugins[T](D,b[T]);U&&S.push(U)}D.callPlugins=function(a,b){b||(b={});for(var c=0;c<S.length;c++)a in S[c]&&S[c][a](b)},!D.browser.ie10&&!D.browser.ie11||b.onlyExternal||D.wrapper.classList.add("swiper-wp8-"+(N?"horizontal":"vertical")),b.freeMode&&(D.container.className+=" swiper-free-mode"),D.initialized=!1,D.init=function(a,c){var d=D.h.getWidth(D.container,!1,b.roundLengths),e=D.h.getHeight(D.container,!1,b.roundLengths);if(d!==D.width||e!==D.height||a){D.width=d,D.height=e;var f,g,h,i,j,k,l;J=N?d:e;var m=D.wrapper;if(a&&D.calcSlides(c),"auto"===b.slidesPerView){var n=0,o=0;b.slidesOffset>0&&(m.style.paddingLeft="",m.style.paddingRight="",m.style.paddingTop="",m.style.paddingBottom=""),m.style.width="",m.style.height="",b.offsetPxBefore>0&&(N?D.wrapperLeft=b.offsetPxBefore:D.wrapperTop=b.offsetPxBefore),b.offsetPxAfter>0&&(N?D.wrapperRight=b.offsetPxAfter:D.wrapperBottom=b.offsetPxAfter),b.centeredSlides&&(N?(D.wrapperLeft=(J-this.slides[0].getWidth(!0,b.roundLengths))/2,D.wrapperRight=(J-D.slides[D.slides.length-1].getWidth(!0,b.roundLengths))/2):(D.wrapperTop=(J-D.slides[0].getHeight(!0,b.roundLengths))/2,D.wrapperBottom=(J-D.slides[D.slides.length-1].getHeight(!0,b.roundLengths))/2)),N?(D.wrapperLeft>=0&&(m.style.paddingLeft=D.wrapperLeft+"px"),D.wrapperRight>=0&&(m.style.paddingRight=D.wrapperRight+"px")):(D.wrapperTop>=0&&(m.style.paddingTop=D.wrapperTop+"px"),D.wrapperBottom>=0&&(m.style.paddingBottom=D.wrapperBottom+"px")),k=0;var p=0;for(D.snapGrid=[],D.slidesGrid=[],h=0,l=0;l<D.slides.length;l++){f=D.slides[l].getWidth(!0,b.roundLengths),g=D.slides[l].getHeight(!0,b.roundLengths),b.calculateHeight&&(h=Math.max(h,g));var q=N?f:g;if(b.centeredSlides){var r=l===D.slides.length-1?0:D.slides[l+1].getWidth(!0,b.roundLengths),s=l===D.slides.length-1?0:D.slides[l+1].getHeight(!0,b.roundLengths),t=N?r:s;if(q>J){if(b.slidesPerViewFit)D.snapGrid.push(k+D.wrapperLeft),D.snapGrid.push(k+q-J+D.wrapperLeft);else for(var u=0;u<=Math.floor(q/(J+D.wrapperLeft));u++)D.snapGrid.push(0===u?k+D.wrapperLeft:k+D.wrapperLeft+J*u);D.slidesGrid.push(k+D.wrapperLeft)}else D.snapGrid.push(p),D.slidesGrid.push(p);p+=q/2+t/2}else{if(q>J)if(b.slidesPerViewFit)D.snapGrid.push(k),D.snapGrid.push(k+q-J);else if(0!==J)for(var v=0;v<=Math.floor(q/J);v++)D.snapGrid.push(k+J*v);else D.snapGrid.push(k);else D.snapGrid.push(k);D.slidesGrid.push(k)}k+=q,n+=f,o+=g}b.calculateHeight&&(D.height=h),N?(G=n+D.wrapperRight+D.wrapperLeft,b.cssWidthAndHeight&&"height"!==b.cssWidthAndHeight||(m.style.width=n+"px"),b.cssWidthAndHeight&&"width"!==b.cssWidthAndHeight||(m.style.height=D.height+"px")):(b.cssWidthAndHeight&&"height"!==b.cssWidthAndHeight||(m.style.width=D.width+"px"),b.cssWidthAndHeight&&"width"!==b.cssWidthAndHeight||(m.style.height=o+"px"),G=o+D.wrapperTop+D.wrapperBottom)}else if(b.scrollContainer)m.style.width="",m.style.height="",i=D.slides[0].getWidth(!0,b.roundLengths),j=D.slides[0].getHeight(!0,b.roundLengths),G=N?i:j,m.style.width=i+"px",m.style.height=j+"px",F=N?i:j;else{if(b.calculateHeight){for(h=0,j=0,N||(D.container.style.height=""),m.style.height="",l=0;l<D.slides.length;l++)D.slides[l].style.height="",h=Math.max(D.slides[l].getHeight(!0),h),N||(j+=D.slides[l].getHeight(!0));g=h,D.height=g,N?j=g:(J=g,D.container.style.height=J+"px")}else g=N?D.height:D.height/b.slidesPerView,b.roundLengths&&(g=Math.ceil(g)),j=N?D.height:D.slides.length*g;for(f=N?D.width/b.slidesPerView:D.width,b.roundLengths&&(f=Math.ceil(f)),i=N?D.slides.length*f:D.width,F=N?f:g,b.offsetSlidesBefore>0&&(N?D.wrapperLeft=F*b.offsetSlidesBefore:D.wrapperTop=F*b.offsetSlidesBefore),b.offsetSlidesAfter>0&&(N?D.wrapperRight=F*b.offsetSlidesAfter:D.wrapperBottom=F*b.offsetSlidesAfter),b.offsetPxBefore>0&&(N?D.wrapperLeft=b.offsetPxBefore:D.wrapperTop=b.offsetPxBefore),b.offsetPxAfter>0&&(N?D.wrapperRight=b.offsetPxAfter:D.wrapperBottom=b.offsetPxAfter),b.centeredSlides&&(N?(D.wrapperLeft=(J-F)/2,D.wrapperRight=(J-F)/2):(D.wrapperTop=(J-F)/2,D.wrapperBottom=(J-F)/2)),N?(D.wrapperLeft>0&&(m.style.paddingLeft=D.wrapperLeft+"px"),D.wrapperRight>0&&(m.style.paddingRight=D.wrapperRight+"px")):(D.wrapperTop>0&&(m.style.paddingTop=D.wrapperTop+"px"),D.wrapperBottom>0&&(m.style.paddingBottom=D.wrapperBottom+"px")),G=N?i+D.wrapperRight+D.wrapperLeft:j+D.wrapperTop+D.wrapperBottom,parseFloat(i)>0&&(!b.cssWidthAndHeight||"height"===b.cssWidthAndHeight)&&(m.style.width=i+"px"),parseFloat(j)>0&&(!b.cssWidthAndHeight||"width"===b.cssWidthAndHeight)&&(m.style.height=j+"px"),k=0,D.snapGrid=[],D.slidesGrid=[],l=0;l<D.slides.length;l++)D.snapGrid.push(k),D.slidesGrid.push(k),k+=F,parseFloat(f)>0&&(!b.cssWidthAndHeight||"height"===b.cssWidthAndHeight)&&(D.slides[l].style.width=f+"px"),parseFloat(g)>0&&(!b.cssWidthAndHeight||"width"===b.cssWidthAndHeight)&&(D.slides[l].style.height=g+"px")}D.initialized?(D.callPlugins("onInit"),b.onInit&&D.fireCallback(b.onInit,D)):(D.callPlugins("onFirstInit"),b.onFirstInit&&D.fireCallback(b.onFirstInit,D)),D.initialized=!0}},D.reInit=function(a){D.init(!0,a)},D.resizeFix=function(a){D.callPlugins("beforeResizeFix"),D.init(b.resizeReInit||a),b.freeMode?D.getWrapperTranslate()<-e()&&(D.setWrapperTransition(0),D.setWrapperTranslate(-e())):(D.swipeTo(b.loop?D.activeLoopIndex:D.activeIndex,0,!1),b.autoplay&&(D.support.transitions&&"undefined"!=typeof ab?"undefined"!=typeof ab&&(clearTimeout(ab),ab=void 0,D.startAutoplay()):"undefined"!=typeof bb&&(clearInterval(bb),bb=void 0,D.startAutoplay()))),D.callPlugins("afterResizeFix")},D.destroy=function(a){var c=D.h.removeEventListener,d="wrapper"===b.eventTarget?D.wrapper:D.container;if(D.browser.ie10||D.browser.ie11?(c(d,D.touchEvents.touchStart,p),c(document,D.touchEvents.touchMove,q),c(document,D.touchEvents.touchEnd,r)):(D.support.touch&&(c(d,"touchstart",p),c(d,"touchmove",q),c(d,"touchend",r)),b.simulateTouch&&(c(d,"mousedown",p),c(document,"mousemove",q),c(document,"mouseup",r))),b.autoResize&&c(window,"resize",D.resizeFix),h(),b.paginationClickable&&x(),b.mousewheelControl&&D._wheelEvent&&c(D.container,D._wheelEvent,j),b.keyboardControl&&c(document,"keydown",i),b.autoplay&&D.stopAutoplay(),a){D.wrapper.removeAttribute("style");for(var e=0;e<D.slides.length;e++)D.slides[e].removeAttribute("style")}D.callPlugins("onDestroy"),window.jQuery&&window.jQuery(D.container).data("swiper")&&window.jQuery(D.container).removeData("swiper"),window.Zepto&&window.Zepto(D.container).data("swiper")&&window.Zepto(D.container).removeData("swiper"),D=null},D.disableKeyboardControl=function(){b.keyboardControl=!1,D.h.removeEventListener(document,"keydown",i)},D.enableKeyboardControl=function(){b.keyboardControl=!0,D.h.addEventListener(document,"keydown",i)};var V=(new Date).getTime();if(D.disableMousewheelControl=function(){return D._wheelEvent?(b.mousewheelControl=!1,D.h.removeEventListener(D.container,D._wheelEvent,j),!0):!1},D.enableMousewheelControl=function(){return D._wheelEvent?(b.mousewheelControl=!0,D.h.addEventListener(D.container,D._wheelEvent,j),!0):!1},b.grabCursor){var W=D.container.style;W.cursor="move",W.cursor="grab",W.cursor="-moz-grab",W.cursor="-webkit-grab"}D.allowSlideClick=!0,D.allowLinks=!0;var X,Y,Z,$=!1,_=!0;D.swipeNext=function(a,c){"undefined"==typeof a&&(a=!0),!c&&b.loop&&D.fixLoop(),!c&&b.autoplay&&D.stopAutoplay(!0),D.callPlugins("onSwipeNext");var d=D.getWrapperTranslate().toFixed(2),f=d;if("auto"===b.slidesPerView){for(var g=0;g<D.snapGrid.length;g++)if(-d>=D.snapGrid[g].toFixed(2)&&-d<D.snapGrid[g+1].toFixed(2)){f=-D.snapGrid[g+1];break}}else{var h=F*b.slidesPerGroup;f=-(Math.floor(Math.abs(d)/Math.floor(h))*h+h)}return f<-e()&&(f=-e()),f===d?!1:(v(f,"next",{runCallbacks:a}),!0)},D.swipePrev=function(a,c){"undefined"==typeof a&&(a=!0),!c&&b.loop&&D.fixLoop(),!c&&b.autoplay&&D.stopAutoplay(!0),D.callPlugins("onSwipePrev");var d,e=Math.ceil(D.getWrapperTranslate());if("auto"===b.slidesPerView){d=0;for(var f=1;f<D.snapGrid.length;f++){if(-e===D.snapGrid[f]){d=-D.snapGrid[f-1];break}if(-e>D.snapGrid[f]&&-e<D.snapGrid[f+1]){d=-D.snapGrid[f];break}}}else{var g=F*b.slidesPerGroup;d=-(Math.ceil(-e/g)-1)*g}return d>0&&(d=0),d===e?!1:(v(d,"prev",{runCallbacks:a}),!0)},D.swipeReset=function(a){"undefined"==typeof a&&(a=!0),D.callPlugins("onSwipeReset");{var c,d=D.getWrapperTranslate(),f=F*b.slidesPerGroup;-e()}if("auto"===b.slidesPerView){c=0;for(var g=0;g<D.snapGrid.length;g++){if(-d===D.snapGrid[g])return;if(-d>=D.snapGrid[g]&&-d<D.snapGrid[g+1]){c=D.positions.diff>0?-D.snapGrid[g+1]:-D.snapGrid[g];break}}-d>=D.snapGrid[D.snapGrid.length-1]&&(c=-D.snapGrid[D.snapGrid.length-1]),d<=-e()&&(c=-e())}else c=0>d?Math.round(d/f)*f:0,d<=-e()&&(c=-e());return b.scrollContainer&&(c=0>d?d:0),c<-e()&&(c=-e()),b.scrollContainer&&J>F&&(c=0),c===d?!1:(v(c,"reset",{runCallbacks:a}),!0)},D.swipeTo=function(a,c,d){a=parseInt(a,10),D.callPlugins("onSwipeTo",{index:a,speed:c}),b.loop&&(a+=D.loopedSlides);var f=D.getWrapperTranslate();if(!(!isFinite(a)||a>D.slides.length-1||0>a)){var g;return g="auto"===b.slidesPerView?-D.slidesGrid[a]:-a*F,g<-e()&&(g=-e()),g===f?!1:("undefined"==typeof d&&(d=!0),v(g,"to",{index:a,speed:c,runCallbacks:d}),!0)}},D._queueStartCallbacks=!1,D._queueEndCallbacks=!1,D.updateActiveSlide=function(a){if(D.initialized&&0!==D.slides.length){D.previousIndex=D.activeIndex,"undefined"==typeof a&&(a=D.getWrapperTranslate()),a>0&&(a=0);var c;if("auto"===b.slidesPerView){if(D.activeIndex=D.slidesGrid.indexOf(-a),D.activeIndex<0){for(c=0;c<D.slidesGrid.length-1&&!(-a>D.slidesGrid[c]&&-a<D.slidesGrid[c+1]);c++);var d=Math.abs(D.slidesGrid[c]+a),e=Math.abs(D.slidesGrid[c+1]+a);
D.activeIndex=e>=d?c:c+1}}else D.activeIndex=Math[b.visibilityFullFit?"ceil":"round"](-a/F);if(D.activeIndex===D.slides.length&&(D.activeIndex=D.slides.length-1),D.activeIndex<0&&(D.activeIndex=0),D.slides[D.activeIndex]){if(D.calcVisibleSlides(a),D.support.classList){var f;for(c=0;c<D.slides.length;c++)f=D.slides[c],f.classList.remove(b.slideActiveClass),D.visibleSlides.indexOf(f)>=0?f.classList.add(b.slideVisibleClass):f.classList.remove(b.slideVisibleClass);D.slides[D.activeIndex].classList.add(b.slideActiveClass)}else{var g=new RegExp("\\s*"+b.slideActiveClass),h=new RegExp("\\s*"+b.slideVisibleClass);for(c=0;c<D.slides.length;c++)D.slides[c].className=D.slides[c].className.replace(g,"").replace(h,""),D.visibleSlides.indexOf(D.slides[c])>=0&&(D.slides[c].className+=" "+b.slideVisibleClass);D.slides[D.activeIndex].className+=" "+b.slideActiveClass}if(b.loop){var i=D.loopedSlides;D.activeLoopIndex=D.activeIndex-i,D.activeLoopIndex>=D.slides.length-2*i&&(D.activeLoopIndex=D.slides.length-2*i-D.activeLoopIndex),D.activeLoopIndex<0&&(D.activeLoopIndex=D.slides.length-2*i+D.activeLoopIndex),D.activeLoopIndex<0&&(D.activeLoopIndex=0)}else D.activeLoopIndex=D.activeIndex;b.pagination&&D.updatePagination(a)}}},D.createPagination=function(a){if(b.paginationClickable&&D.paginationButtons&&x(),D.paginationContainer=b.pagination.nodeType?b.pagination:c(b.pagination)[0],b.createPagination){var d="",e=D.slides.length,f=e;b.loop&&(f-=2*D.loopedSlides);for(var g=0;f>g;g++)d+="<"+b.paginationElement+' class="'+b.paginationElementClass+'"></'+b.paginationElement+">";D.paginationContainer.innerHTML=d}D.paginationButtons=c("."+b.paginationElementClass,D.paginationContainer),a||D.updatePagination(),D.callPlugins("onCreatePagination"),b.paginationClickable&&y()},D.updatePagination=function(a){if(b.pagination&&!(D.slides.length<1)){var d=c("."+b.paginationActiveClass,D.paginationContainer);if(d){var e=D.paginationButtons;if(0!==e.length){for(var f=0;f<e.length;f++)e[f].className=b.paginationElementClass;var g=b.loop?D.loopedSlides:0;if(b.paginationAsRange){D.visibleSlides||D.calcVisibleSlides(a);var h,i=[];for(h=0;h<D.visibleSlides.length;h++){var j=D.slides.indexOf(D.visibleSlides[h])-g;b.loop&&0>j&&(j=D.slides.length-2*D.loopedSlides+j),b.loop&&j>=D.slides.length-2*D.loopedSlides&&(j=D.slides.length-2*D.loopedSlides-j,j=Math.abs(j)),i.push(j)}for(h=0;h<i.length;h++)e[i[h]]&&(e[i[h]].className+=" "+b.paginationVisibleClass);b.loop?void 0!==e[D.activeLoopIndex]&&(e[D.activeLoopIndex].className+=" "+b.paginationActiveClass):e[D.activeIndex]&&(e[D.activeIndex].className+=" "+b.paginationActiveClass)}else b.loop?e[D.activeLoopIndex]&&(e[D.activeLoopIndex].className+=" "+b.paginationActiveClass+" "+b.paginationVisibleClass):e[D.activeIndex]&&(e[D.activeIndex].className+=" "+b.paginationActiveClass+" "+b.paginationVisibleClass)}}}},D.calcVisibleSlides=function(a){var c=[],d=0,e=0,f=0;N&&D.wrapperLeft>0&&(a+=D.wrapperLeft),!N&&D.wrapperTop>0&&(a+=D.wrapperTop);for(var g=0;g<D.slides.length;g++){d+=e,e="auto"===b.slidesPerView?N?D.h.getWidth(D.slides[g],!0,b.roundLengths):D.h.getHeight(D.slides[g],!0,b.roundLengths):F,f=d+e;var h=!1;b.visibilityFullFit?(d>=-a&&-a+J>=f&&(h=!0),-a>=d&&f>=-a+J&&(h=!0)):(f>-a&&-a+J>=f&&(h=!0),d>=-a&&-a+J>d&&(h=!0),-a>d&&f>-a+J&&(h=!0)),h&&c.push(D.slides[g])}0===c.length&&(c=[D.slides[D.activeIndex]]),D.visibleSlides=c};var ab,bb;D.startAutoplay=function(){if(D.support.transitions){if("undefined"!=typeof ab)return!1;if(!b.autoplay)return;D.callPlugins("onAutoplayStart"),b.onAutoplayStart&&D.fireCallback(b.onAutoplayStart,D),A()}else{if("undefined"!=typeof bb)return!1;if(!b.autoplay)return;D.callPlugins("onAutoplayStart"),b.onAutoplayStart&&D.fireCallback(b.onAutoplayStart,D),bb=setInterval(function(){b.loop?(D.fixLoop(),D.swipeNext(!0,!0)):D.swipeNext(!0,!0)||(b.autoplayStopOnLast?(clearInterval(bb),bb=void 0):D.swipeTo(0))},b.autoplay)}},D.stopAutoplay=function(a){if(D.support.transitions){if(!ab)return;ab&&clearTimeout(ab),ab=void 0,a&&!b.autoplayDisableOnInteraction&&D.wrapperTransitionEnd(function(){A()}),D.callPlugins("onAutoplayStop"),b.onAutoplayStop&&D.fireCallback(b.onAutoplayStop,D)}else bb&&clearInterval(bb),bb=void 0,D.callPlugins("onAutoplayStop"),b.onAutoplayStop&&D.fireCallback(b.onAutoplayStop,D)},D.loopCreated=!1,D.removeLoopedSlides=function(){if(D.loopCreated)for(var a=0;a<D.slides.length;a++)D.slides[a].getData("looped")===!0&&D.wrapper.removeChild(D.slides[a])},D.createLoop=function(){if(0!==D.slides.length){D.loopedSlides="auto"===b.slidesPerView?b.loopedSlides||1:Math.floor(b.slidesPerView)+b.loopAdditionalSlides,D.loopedSlides>D.slides.length&&(D.loopedSlides=D.slides.length);var a,c="",d="",e="",f=D.slides.length,g=Math.floor(D.loopedSlides/f),h=D.loopedSlides%f;for(a=0;g*f>a;a++){var i=a;if(a>=f){var j=Math.floor(a/f);i=a-f*j}e+=D.slides[i].outerHTML}for(a=0;h>a;a++)d+=u(b.slideDuplicateClass,D.slides[a].outerHTML);for(a=f-h;f>a;a++)c+=u(b.slideDuplicateClass,D.slides[a].outerHTML);var k=c+e+E.innerHTML+e+d;for(E.innerHTML=k,D.loopCreated=!0,D.calcSlides(),a=0;a<D.slides.length;a++)(a<D.loopedSlides||a>=D.slides.length-D.loopedSlides)&&D.slides[a].setData("looped",!0);D.callPlugins("onCreateLoop")}},D.fixLoop=function(){var a;D.activeIndex<D.loopedSlides?(a=D.slides.length-3*D.loopedSlides+D.activeIndex,D.swipeTo(a,0,!1)):("auto"===b.slidesPerView&&D.activeIndex>=2*D.loopedSlides||D.activeIndex>D.slides.length-2*b.slidesPerView)&&(a=-D.slides.length+D.activeIndex+D.loopedSlides,D.swipeTo(a,0,!1))},D.loadSlides=function(){var a="";D.activeLoaderIndex=0;for(var c=b.loader.slides,d=b.loader.loadAllSlides?c.length:b.slidesPerView*(1+b.loader.surroundGroups),e=0;d>e;e++)a+="outer"===b.loader.slidesHTMLType?c[e]:"<"+b.slideElement+' class="'+b.slideClass+'" data-swiperindex="'+e+'">'+c[e]+"</"+b.slideElement+">";D.wrapper.innerHTML=a,D.calcSlides(!0),b.loader.loadAllSlides||D.wrapperTransitionEnd(D.reloadSlides,!0)},D.reloadSlides=function(){var a=b.loader.slides,c=parseInt(D.activeSlide().data("swiperindex"),10);if(!(0>c||c>a.length-1)){D.activeLoaderIndex=c;var d=Math.max(0,c-b.slidesPerView*b.loader.surroundGroups),e=Math.min(c+b.slidesPerView*(1+b.loader.surroundGroups)-1,a.length-1);if(c>0){var f=-F*(c-d);D.setWrapperTranslate(f),D.setWrapperTransition(0)}var g;if("reload"===b.loader.logic){D.wrapper.innerHTML="";var h="";for(g=d;e>=g;g++)h+="outer"===b.loader.slidesHTMLType?a[g]:"<"+b.slideElement+' class="'+b.slideClass+'" data-swiperindex="'+g+'">'+a[g]+"</"+b.slideElement+">";D.wrapper.innerHTML=h}else{var i=1e3,j=0;for(g=0;g<D.slides.length;g++){var k=D.slides[g].data("swiperindex");d>k||k>e?D.wrapper.removeChild(D.slides[g]):(i=Math.min(k,i),j=Math.max(k,j))}for(g=d;e>=g;g++){var l;i>g&&(l=document.createElement(b.slideElement),l.className=b.slideClass,l.setAttribute("data-swiperindex",g),l.innerHTML=a[g],D.wrapper.insertBefore(l,D.wrapper.firstChild)),g>j&&(l=document.createElement(b.slideElement),l.className=b.slideClass,l.setAttribute("data-swiperindex",g),l.innerHTML=a[g],D.wrapper.appendChild(l))}}D.reInit(!0)}},B()}};Swiper.prototype={plugins:{},wrapperTransitionEnd:function(a,b){"use strict";function c(h){if(h.target===f&&(a(e),e.params.queueEndCallbacks&&(e._queueEndCallbacks=!1),!b))for(d=0;d<g.length;d++)e.h.removeEventListener(f,g[d],c)}var d,e=this,f=e.wrapper,g=["webkitTransitionEnd","transitionend","oTransitionEnd","MSTransitionEnd","msTransitionEnd"];if(a)for(d=0;d<g.length;d++)e.h.addEventListener(f,g[d],c)},getWrapperTranslate:function(a){"use strict";var b,c,d,e,f=this.wrapper;return"undefined"==typeof a&&(a="horizontal"===this.params.mode?"x":"y"),this.support.transforms&&this.params.useCSS3Transforms?(d=window.getComputedStyle(f,null),window.WebKitCSSMatrix?e=new WebKitCSSMatrix("none"===d.webkitTransform?"":d.webkitTransform):(e=d.MozTransform||d.OTransform||d.MsTransform||d.msTransform||d.transform||d.getPropertyValue("transform").replace("translate(","matrix(1, 0, 0, 1,"),b=e.toString().split(",")),"x"===a&&(c=window.WebKitCSSMatrix?e.m41:parseFloat(16===b.length?b[12]:b[4])),"y"===a&&(c=window.WebKitCSSMatrix?e.m42:parseFloat(16===b.length?b[13]:b[5]))):("x"===a&&(c=parseFloat(f.style.left,10)||0),"y"===a&&(c=parseFloat(f.style.top,10)||0)),c||0},setWrapperTranslate:function(a,b,c){"use strict";var d,e=this.wrapper.style,f={x:0,y:0,z:0};3===arguments.length?(f.x=a,f.y=b,f.z=c):("undefined"==typeof b&&(b="horizontal"===this.params.mode?"x":"y"),f[b]=a),this.support.transforms&&this.params.useCSS3Transforms?(d=this.support.transforms3d?"translate3d("+f.x+"px, "+f.y+"px, "+f.z+"px)":"translate("+f.x+"px, "+f.y+"px)",e.webkitTransform=e.MsTransform=e.msTransform=e.MozTransform=e.OTransform=e.transform=d):(e.left=f.x+"px",e.top=f.y+"px"),this.callPlugins("onSetWrapperTransform",f),this.params.onSetWrapperTransform&&this.fireCallback(this.params.onSetWrapperTransform,this,f)},setWrapperTransition:function(a){"use strict";var b=this.wrapper.style;b.webkitTransitionDuration=b.MsTransitionDuration=b.msTransitionDuration=b.MozTransitionDuration=b.OTransitionDuration=b.transitionDuration=a/1e3+"s",this.callPlugins("onSetWrapperTransition",{duration:a}),this.params.onSetWrapperTransition&&this.fireCallback(this.params.onSetWrapperTransition,this,a)},h:{getWidth:function(a,b,c){"use strict";var d=window.getComputedStyle(a,null).getPropertyValue("width"),e=parseFloat(d);return(isNaN(e)||d.indexOf("%")>0||0>e)&&(e=a.offsetWidth-parseFloat(window.getComputedStyle(a,null).getPropertyValue("padding-left"))-parseFloat(window.getComputedStyle(a,null).getPropertyValue("padding-right"))),b&&(e+=parseFloat(window.getComputedStyle(a,null).getPropertyValue("padding-left"))+parseFloat(window.getComputedStyle(a,null).getPropertyValue("padding-right"))),c?Math.ceil(e):e},getHeight:function(a,b,c){"use strict";if(b)return a.offsetHeight;var d=window.getComputedStyle(a,null).getPropertyValue("height"),e=parseFloat(d);return(isNaN(e)||d.indexOf("%")>0||0>e)&&(e=a.offsetHeight-parseFloat(window.getComputedStyle(a,null).getPropertyValue("padding-top"))-parseFloat(window.getComputedStyle(a,null).getPropertyValue("padding-bottom"))),b&&(e+=parseFloat(window.getComputedStyle(a,null).getPropertyValue("padding-top"))+parseFloat(window.getComputedStyle(a,null).getPropertyValue("padding-bottom"))),c?Math.ceil(e):e},getOffset:function(a){"use strict";var b=a.getBoundingClientRect(),c=document.body,d=a.clientTop||c.clientTop||0,e=a.clientLeft||c.clientLeft||0,f=window.pageYOffset||a.scrollTop,g=window.pageXOffset||a.scrollLeft;return document.documentElement&&!window.pageYOffset&&(f=document.documentElement.scrollTop,g=document.documentElement.scrollLeft),{top:b.top+f-d,left:b.left+g-e}},windowWidth:function(){"use strict";return window.innerWidth?window.innerWidth:document.documentElement&&document.documentElement.clientWidth?document.documentElement.clientWidth:void 0},windowHeight:function(){"use strict";return window.innerHeight?window.innerHeight:document.documentElement&&document.documentElement.clientHeight?document.documentElement.clientHeight:void 0},windowScroll:function(){"use strict";return"undefined"!=typeof pageYOffset?{left:window.pageXOffset,top:window.pageYOffset}:document.documentElement?{left:document.documentElement.scrollLeft,top:document.documentElement.scrollTop}:void 0},addEventListener:function(a,b,c,d){"use strict";"undefined"==typeof d&&(d=!1),a.addEventListener?a.addEventListener(b,c,d):a.attachEvent&&a.attachEvent("on"+b,c)},removeEventListener:function(a,b,c,d){"use strict";"undefined"==typeof d&&(d=!1),a.removeEventListener?a.removeEventListener(b,c,d):a.detachEvent&&a.detachEvent("on"+b,c)}},setTransform:function(a,b){"use strict";var c=a.style;c.webkitTransform=c.MsTransform=c.msTransform=c.MozTransform=c.OTransform=c.transform=b},setTranslate:function(a,b){"use strict";var c=a.style,d={x:b.x||0,y:b.y||0,z:b.z||0},e=this.support.transforms3d?"translate3d("+d.x+"px,"+d.y+"px,"+d.z+"px)":"translate("+d.x+"px,"+d.y+"px)";c.webkitTransform=c.MsTransform=c.msTransform=c.MozTransform=c.OTransform=c.transform=e,this.support.transforms||(c.left=d.x+"px",c.top=d.y+"px")},setTransition:function(a,b){"use strict";var c=a.style;c.webkitTransitionDuration=c.MsTransitionDuration=c.msTransitionDuration=c.MozTransitionDuration=c.OTransitionDuration=c.transitionDuration=b+"ms"},support:{touch:window.Modernizr&&Modernizr.touch===!0||function(){"use strict";return!!("ontouchstart"in window||window.DocumentTouch&&document instanceof DocumentTouch)}(),transforms3d:window.Modernizr&&Modernizr.csstransforms3d===!0||function(){"use strict";var a=document.createElement("div").style;return"webkitPerspective"in a||"MozPerspective"in a||"OPerspective"in a||"MsPerspective"in a||"perspective"in a}(),transforms:window.Modernizr&&Modernizr.csstransforms===!0||function(){"use strict";var a=document.createElement("div").style;return"transform"in a||"WebkitTransform"in a||"MozTransform"in a||"msTransform"in a||"MsTransform"in a||"OTransform"in a}(),transitions:window.Modernizr&&Modernizr.csstransitions===!0||function(){"use strict";var a=document.createElement("div").style;return"transition"in a||"WebkitTransition"in a||"MozTransition"in a||"msTransition"in a||"MsTransition"in a||"OTransition"in a}(),classList:function(){"use strict";var a=document.createElement("div");return"classList"in a}()},browser:{ie8:function(){"use strict";var a=-1;if("Microsoft Internet Explorer"===navigator.appName){var b=navigator.userAgent,c=new RegExp(/MSIE ([0-9]{1,}[\.0-9]{0,})/);null!==c.exec(b)&&(a=parseFloat(RegExp.$1))}return-1!==a&&9>a}(),ie10:window.navigator.msPointerEnabled,ie11:window.navigator.pointerEnabled}},(window.jQuery||window.Zepto)&&!function(a){"use strict";a.fn.swiper=function(b){var c;return this.each(function(d){var e=a(this),f=new Swiper(e[0],b);d||(c=f),e.data("swiper",f)}),c}}(window.jQuery||window.Zepto),"undefined"!=typeof module?module.exports=Swiper:"function"==typeof define&&define.amd&&define([],function(){"use strict";return Swiper});

/**********************************************************************Swiper  2.7.6 end***********************************************************************/
/*!
 * SuperSlide v2.1.1 
 * 轻松解决网站大部分特效展示问题
 * 详尽信息请看官网：http://www.SuperSlide2.com/
 *
 * Copyright 2011-2013, 大话主席
 *
 * 请尊重原创，保留头部版权
 * 在保留版权的前提下可应用于个人或商业用途

 * v2.1.1：修复当调用多个SuperSlide，并设置returnDefault:true 时返回defaultIndex索引错误

 */

!function(a){a.fn.slide=function(b){return a.fn.slide.defaults={type:"slide",effect:"fade",autoPlay:!1,delayTime:500,interTime:2500,triggerTime:150,defaultIndex:0,titCell:".hd li",mainCell:".bd",targetCell:null,trigger:"mouseover",scroll:1,vis:1,titOnClassName:"on",autoPage:!1,prevCell:".prev",nextCell:".next",pageStateCell:".pageState",opp:!1,pnLoop:!0,easing:"swing",startFun:null,endFun:null,switchLoad:null,playStateCell:".playState",mouseOverStop:!0,defaultPlay:!0,returnDefault:!1},this.each(function(){var c=a.extend({},a.fn.slide.defaults,b),d=a(this),e=c.effect,f=a(c.prevCell,d),g=a(c.nextCell,d),h=a(c.pageStateCell,d),i=a(c.playStateCell,d),j=a(c.titCell,d),k=j.size(),l=a(c.mainCell,d),m=l.children().size(),n=c.switchLoad,o=a(c.targetCell,d),p=parseInt(c.defaultIndex),q=parseInt(c.delayTime),r=parseInt(c.interTime);parseInt(c.triggerTime);var Q,t=parseInt(c.scroll),u=parseInt(c.vis),v="false"==c.autoPlay||0==c.autoPlay?!1:!0,w="false"==c.opp||0==c.opp?!1:!0,x="false"==c.autoPage||0==c.autoPage?!1:!0,y="false"==c.pnLoop||0==c.pnLoop?!1:!0,z="false"==c.mouseOverStop||0==c.mouseOverStop?!1:!0,A="false"==c.defaultPlay||0==c.defaultPlay?!1:!0,B="false"==c.returnDefault||0==c.returnDefault?!1:!0,C=0,D=0,E=0,F=0,G=c.easing,H=null,I=null,J=null,K=c.titOnClassName,L=j.index(d.find("."+K)),M=p=-1==L?p:L,N=p,O=p,P=m>=u?0!=m%t?m%t:t:0,R="leftMarquee"==e||"topMarquee"==e?!0:!1,S=function(){a.isFunction(c.startFun)&&c.startFun(p,k,d,a(c.titCell,d),l,o,f,g)},T=function(){a.isFunction(c.endFun)&&c.endFun(p,k,d,a(c.titCell,d),l,o,f,g)},U=function(){j.removeClass(K),A&&j.eq(N).addClass(K)};if("menu"==c.type)return A&&j.removeClass(K).eq(p).addClass(K),j.hover(function(){Q=a(this).find(c.targetCell);var b=j.index(a(this));I=setTimeout(function(){switch(p=b,j.removeClass(K).eq(p).addClass(K),S(),e){case"fade":Q.stop(!0,!0).animate({opacity:"show"},q,G,T);break;case"slideDown":Q.stop(!0,!0).animate({height:"show"},q,G,T)}},c.triggerTime)},function(){switch(clearTimeout(I),e){case"fade":Q.animate({opacity:"hide"},q,G);break;case"slideDown":Q.animate({height:"hide"},q,G)}}),B&&d.hover(function(){clearTimeout(J)},function(){J=setTimeout(U,q)}),void 0;if(0==k&&(k=m),R&&(k=2),x){if(m>=u)if("leftLoop"==e||"topLoop"==e)k=0!=m%t?(0^m/t)+1:m/t;else{var V=m-u;k=1+parseInt(0!=V%t?V/t+1:V/t),0>=k&&(k=1)}else k=1;j.html("");var W="";if(1==c.autoPage||"true"==c.autoPage)for(var X=0;k>X;X++)W+="<li>"+(X+1)+"</li>";else for(var X=0;k>X;X++)W+=c.autoPage.replace("$",X+1);j.html(W);var j=j.children()}if(m>=u){l.children().each(function(){a(this).width()>E&&(E=a(this).width(),D=a(this).outerWidth(!0)),a(this).height()>F&&(F=a(this).height(),C=a(this).outerHeight(!0))});var Y=l.children(),Z=function(){for(var a=0;u>a;a++)Y.eq(a).clone().addClass("clone").appendTo(l);for(var a=0;P>a;a++)Y.eq(m-a-1).clone().addClass("clone").prependTo(l)};switch(e){case"fold":l.css({position:"relative",width:D,height:C}).children().css({position:"absolute",width:E,left:0,top:0,display:"none"});break;case"top":l.wrap('<div class="tempWrap" style="overflow:hidden; position:relative; height:'+u*C+'px"></div>').css({top:-(p*t)*C,position:"relative",padding:"0",margin:"0"}).children().css({height:F});break;case"left":l.wrap('<div class="tempWrap" style="overflow:hidden; position:relative; width:'+u*D+'px"></div>').css({width:m*D,left:-(p*t)*D,position:"relative",overflow:"hidden",padding:"0",margin:"0"}).children().css({"float":"left",width:E});break;case"leftLoop":case"leftMarquee":Z(),l.wrap('<div class="tempWrap" style="overflow:hidden; position:relative; width:'+u*D+'px"></div>').css({width:(m+u+P)*D,position:"relative",overflow:"hidden",padding:"0",margin:"0",left:-(P+p*t)*D}).children().css({"float":"left",width:E});break;case"topLoop":case"topMarquee":Z(),l.wrap('<div class="tempWrap" style="overflow:hidden; position:relative; height:'+u*C+'px"></div>').css({height:(m+u+P)*C,position:"relative",padding:"0",margin:"0",top:-(P+p*t)*C}).children().css({height:F})}}var $=function(a){var b=a*t;return a==k?b=m:-1==a&&0!=m%t&&(b=-m%t),b},_=function(b){var c=function(c){for(var d=c;u+c>d;d++)b.eq(d).find("img["+n+"]").each(function(){var b=a(this);if(b.attr("src",b.attr(n)).removeAttr(n),l.find(".clone")[0])for(var c=l.children(),d=0;d<c.size();d++)c.eq(d).find("img["+n+"]").each(function(){a(this).attr(n)==b.attr("src")&&a(this).attr("src",a(this).attr(n)).removeAttr(n)})})};switch(e){case"fade":case"fold":case"top":case"left":case"slideDown":c(p*t);break;case"leftLoop":case"topLoop":c(P+$(O));break;case"leftMarquee":case"topMarquee":var d="leftMarquee"==e?l.css("left").replace("px",""):l.css("top").replace("px",""),f="leftMarquee"==e?D:C,g=P;if(0!=d%f){var h=Math.abs(0^d/f);g=1==p?P+h:P+h-1}c(g)}},ab=function(a){if(!A||M!=p||a||R){if(R?p>=1?p=1:0>=p&&(p=0):(O=p,p>=k?p=0:0>p&&(p=k-1)),S(),null!=n&&_(l.children()),o[0]&&(Q=o.eq(p),null!=n&&_(o),"slideDown"==e?(o.not(Q).stop(!0,!0).slideUp(q),Q.slideDown(q,G,function(){l[0]||T()})):(o.not(Q).stop(!0,!0).hide(),Q.animate({opacity:"show"},q,function(){l[0]||T()}))),m>=u)switch(e){case"fade":l.children().stop(!0,!0).eq(p).animate({opacity:"show"},q,G,function(){T()}).siblings().hide();break;case"fold":l.children().stop(!0,!0).eq(p).animate({opacity:"show"},q,G,function(){T()}).siblings().animate({opacity:"hide"},q,G);break;case"top":l.stop(!0,!1).animate({top:-p*t*C},q,G,function(){T()});break;case"left":l.stop(!0,!1).animate({left:-p*t*D},q,G,function(){T()});break;case"leftLoop":var b=O;l.stop(!0,!0).animate({left:-($(O)+P)*D},q,G,function(){-1>=b?l.css("left",-(P+(k-1)*t)*D):b>=k&&l.css("left",-P*D),T()});break;case"topLoop":var b=O;l.stop(!0,!0).animate({top:-($(O)+P)*C},q,G,function(){-1>=b?l.css("top",-(P+(k-1)*t)*C):b>=k&&l.css("top",-P*C),T()});break;case"leftMarquee":var c=l.css("left").replace("px","");0==p?l.animate({left:++c},0,function(){l.css("left").replace("px","")>=0&&l.css("left",-m*D)}):l.animate({left:--c},0,function(){l.css("left").replace("px","")<=-(m+P)*D&&l.css("left",-P*D)});break;case"topMarquee":var d=l.css("top").replace("px","");0==p?l.animate({top:++d},0,function(){l.css("top").replace("px","")>=0&&l.css("top",-m*C)}):l.animate({top:--d},0,function(){l.css("top").replace("px","")<=-(m+P)*C&&l.css("top",-P*C)})}j.removeClass(K).eq(p).addClass(K),M=p,y||(g.removeClass("nextStop"),f.removeClass("prevStop"),0==p&&f.addClass("prevStop"),p==k-1&&g.addClass("nextStop")),h.html("<span>"+(p+1)+"</span>/"+k)}};A&&ab(!0),B&&d.hover(function(){clearTimeout(J)},function(){J=setTimeout(function(){p=N,A?ab():"slideDown"==e?Q.slideUp(q,U):Q.animate({opacity:"hide"},q,U),M=p},300)});var bb=function(a){H=setInterval(function(){w?p--:p++,ab()},a?a:r)},cb=function(a){H=setInterval(ab,a?a:r)},db=function(){z||(clearInterval(H),bb())},eb=function(){(y||p!=k-1)&&(p++,ab(),R||db())},fb=function(){(y||0!=p)&&(p--,ab(),R||db())},gb=function(){clearInterval(H),R?cb():bb(),i.removeClass("pauseState")},hb=function(){clearInterval(H),i.addClass("pauseState")};if(v?R?(w?p--:p++,cb(),z&&l.hover(hb,gb)):(bb(),z&&d.hover(hb,gb)):(R&&(w?p--:p++),i.addClass("pauseState")),i.click(function(){i.hasClass("pauseState")?gb():hb()}),"mouseover"==c.trigger?j.hover(function(){var a=j.index(this);I=setTimeout(function(){p=a,ab(),db()},c.triggerTime)},function(){clearTimeout(I)}):j.click(function(){p=j.index(this),ab(),db()}),R){if(g.mousedown(eb),f.mousedown(fb),y){var ib,jb=function(){ib=setTimeout(function(){clearInterval(H),cb(0^r/10)},150)},kb=function(){clearTimeout(ib),clearInterval(H),cb()};g.mousedown(jb),g.mouseup(kb),f.mousedown(jb),f.mouseup(kb)}"mouseover"==c.trigger&&(g.hover(eb,function(){}),f.hover(fb,function(){}))}else g.click(eb),f.click(fb)})}}(jQuery),jQuery.easing.jswing=jQuery.easing.swing,jQuery.extend(jQuery.easing,{def:"easeOutQuad",swing:function(a,b,c,d,e){return jQuery.easing[jQuery.easing.def](a,b,c,d,e)},easeInQuad:function(a,b,c,d,e){return d*(b/=e)*b+c},easeOutQuad:function(a,b,c,d,e){return-d*(b/=e)*(b-2)+c},easeInOutQuad:function(a,b,c,d,e){return(b/=e/2)<1?d/2*b*b+c:-d/2*(--b*(b-2)-1)+c},easeInCubic:function(a,b,c,d,e){return d*(b/=e)*b*b+c},easeOutCubic:function(a,b,c,d,e){return d*((b=b/e-1)*b*b+1)+c},easeInOutCubic:function(a,b,c,d,e){return(b/=e/2)<1?d/2*b*b*b+c:d/2*((b-=2)*b*b+2)+c},easeInQuart:function(a,b,c,d,e){return d*(b/=e)*b*b*b+c},easeOutQuart:function(a,b,c,d,e){return-d*((b=b/e-1)*b*b*b-1)+c},easeInOutQuart:function(a,b,c,d,e){return(b/=e/2)<1?d/2*b*b*b*b+c:-d/2*((b-=2)*b*b*b-2)+c},easeInQuint:function(a,b,c,d,e){return d*(b/=e)*b*b*b*b+c},easeOutQuint:function(a,b,c,d,e){return d*((b=b/e-1)*b*b*b*b+1)+c},easeInOutQuint:function(a,b,c,d,e){return(b/=e/2)<1?d/2*b*b*b*b*b+c:d/2*((b-=2)*b*b*b*b+2)+c},easeInSine:function(a,b,c,d,e){return-d*Math.cos(b/e*(Math.PI/2))+d+c},easeOutSine:function(a,b,c,d,e){return d*Math.sin(b/e*(Math.PI/2))+c},easeInOutSine:function(a,b,c,d,e){return-d/2*(Math.cos(Math.PI*b/e)-1)+c},easeInExpo:function(a,b,c,d,e){return 0==b?c:d*Math.pow(2,10*(b/e-1))+c},easeOutExpo:function(a,b,c,d,e){return b==e?c+d:d*(-Math.pow(2,-10*b/e)+1)+c},easeInOutExpo:function(a,b,c,d,e){return 0==b?c:b==e?c+d:(b/=e/2)<1?d/2*Math.pow(2,10*(b-1))+c:d/2*(-Math.pow(2,-10*--b)+2)+c},easeInCirc:function(a,b,c,d,e){return-d*(Math.sqrt(1-(b/=e)*b)-1)+c},easeOutCirc:function(a,b,c,d,e){return d*Math.sqrt(1-(b=b/e-1)*b)+c},easeInOutCirc:function(a,b,c,d,e){return(b/=e/2)<1?-d/2*(Math.sqrt(1-b*b)-1)+c:d/2*(Math.sqrt(1-(b-=2)*b)+1)+c},easeInElastic:function(a,b,c,d,e){var f=1.70158,g=0,h=d;if(0==b)return c;if(1==(b/=e))return c+d;if(g||(g=.3*e),h<Math.abs(d)){h=d;var f=g/4}else var f=g/(2*Math.PI)*Math.asin(d/h);return-(h*Math.pow(2,10*(b-=1))*Math.sin((b*e-f)*2*Math.PI/g))+c},easeOutElastic:function(a,b,c,d,e){var f=1.70158,g=0,h=d;if(0==b)return c;if(1==(b/=e))return c+d;if(g||(g=.3*e),h<Math.abs(d)){h=d;var f=g/4}else var f=g/(2*Math.PI)*Math.asin(d/h);return h*Math.pow(2,-10*b)*Math.sin((b*e-f)*2*Math.PI/g)+d+c},easeInOutElastic:function(a,b,c,d,e){var f=1.70158,g=0,h=d;if(0==b)return c;if(2==(b/=e/2))return c+d;if(g||(g=e*.3*1.5),h<Math.abs(d)){h=d;var f=g/4}else var f=g/(2*Math.PI)*Math.asin(d/h);return 1>b?-.5*h*Math.pow(2,10*(b-=1))*Math.sin((b*e-f)*2*Math.PI/g)+c:.5*h*Math.pow(2,-10*(b-=1))*Math.sin((b*e-f)*2*Math.PI/g)+d+c},easeInBack:function(a,b,c,d,e,f){return void 0==f&&(f=1.70158),d*(b/=e)*b*((f+1)*b-f)+c},easeOutBack:function(a,b,c,d,e,f){return void 0==f&&(f=1.70158),d*((b=b/e-1)*b*((f+1)*b+f)+1)+c},easeInOutBack:function(a,b,c,d,e,f){return void 0==f&&(f=1.70158),(b/=e/2)<1?d/2*b*b*(((f*=1.525)+1)*b-f)+c:d/2*((b-=2)*b*(((f*=1.525)+1)*b+f)+2)+c},easeInBounce:function(a,b,c,d,e){return d-jQuery.easing.easeOutBounce(a,e-b,0,d,e)+c},easeOutBounce:function(a,b,c,d,e){return(b/=e)<1/2.75?d*7.5625*b*b+c:2/2.75>b?d*(7.5625*(b-=1.5/2.75)*b+.75)+c:2.5/2.75>b?d*(7.5625*(b-=2.25/2.75)*b+.9375)+c:d*(7.5625*(b-=2.625/2.75)*b+.984375)+c},easeInOutBounce:function(a,b,c,d,e){return e/2>b?.5*jQuery.easing.easeInBounce(a,2*b,0,d,e)+c:.5*jQuery.easing.easeOutBounce(a,2*b-e,0,d,e)+.5*d+c}});


/**********************************************************************公共头部 ***********************************************************************/
	var commonJS = {
		commonJSInit : function(){
			this.city();
		},
		phoneRegular : /^13[0-9]{1}[0-9]{8}$|15[^4]{1}[0-9]{8}$|18[0-9]{1}[0-9]{8}$|17[0-8]{1}[0-9]{8}$|14[5-9]{1}[0-9]{8}$|16[6]{1}[0-9]{8}$|19[8-9]{1}[0-9]{8}$/,
		//设置cookie
		setCookie:function(NameOfCookie, value, expiredays) {
			var ExpireDate = new Date();
			ExpireDate.setTime(ExpireDate.getTime() + (expiredays * 24 * 3600 * 1000));
			document.cookie = NameOfCookie + "=" + escape(value) + ((expiredays == null) ? "": "; expires=" + ExpireDate.toGMTString());
		},
		//获取cookie值
		getCookie:function(NameOfCookie) {
			if (document.cookie.length > 0) {
					var begin = document.cookie.indexOf(NameOfCookie + "=");
					if (begin != -1) {
					begin += NameOfCookie.length + 1; 
					var end = document.cookie.indexOf(";", begin); 
					if (end == -1) end = document.cookie.length;
					return unescape(document.cookie.substring(begin, end));
				};
			};
			return null;
		},
		//删除cookie
		delCookie:function(NameOfCookie) {
			if(this.getCookie(NameOfCookie)) {
				document.cookie = NameOfCookie + "=" + "; expires=Thu, 01-Jan-70 00:00:01 GMT";
			};
		},
		//获取当前日期
		getNowFormatDate:function() {
	        var date = new Date();
	        var seperator1 = "-";
	        var year = date.getFullYear();
	        var month = date.getMonth() + 1;
	        var strDate = date.getDate();
	        
	        if (month >= 1 && month <= 9) {
	            month = "0" + month;
	        }
	        if (strDate >= 0 && strDate <= 9) {
	            strDate = "0" + strDate;
	        }
	        var currentdate = year + seperator1 + month + seperator1 + strDate;
	        return currentdate;
	    },
		 /*获取URL参数方法*/
		GetQueryString:function(arg){		
				  /*定义正则，用于获取相应参数*/
				  	var reg = new RegExp("(^|&)" + arg + "=([^&]*)(&|$)");
				  /*字符串截取，获取匹配参数值*/
				  	var r = window.location.search.substr(1).match(reg);
				  /*返回参数值*/
					  if (r != null){ 
					  	return decodeURI(r[2]);
					  }
					
				  return null;
		},
		CityData:"",
		//定位城市
        city:function(){
        	$.ajax({
		        type: "GET",
		        dataType: 'jsonp',
		        jsonp: 'callback',
		        url: "http://jia.17house.com/iphone/sorthotcity/",
		        timeout: 0,
		        contentType: "application/json;utf-8",
		        success: function(data) {
		        	if(data.err==0){
		        		commonJS.CityData=data;
						if(data.id==2){
							$("input[name=square]").val(70);
						    $("input[name=area]").val(70);
						}else if(data.id==800){
							$("input[name=square]").val(50);	
							$("input[name=area]").val(50);
						}else {
							$("input[name=square]").val(90);
							$("input[name=area]").val(90);
						}		        		
		        		
		        	}
		        }
		    });
        },
        //公用ajax
        ajax:function(url,data,fn){
        	$.ajax({
		        type: "GET",
		        dataType: 'jsonp',
		        jsonp: 'callback',
		        url: url,
		        contentType: "application/json;utf-8",
		        data:data,
		        success: function(data) {
		        	fn(data)
		        }
		    });
        },
        /* 表单输入框获取焦点、失去焦点 */
        focusBlur: function(ele) {
            function trimCode(s) {
                s = $.trim(s);
                s = s.replace(/ /g, '');
                s = s.replace(/\t/g, '');
                s = s.replace(/\r/g, '');
                s = s.replace(/\n/g, '');
                return s;
            }
            for (var i = 0; i < ele.length; i++) {
                var _e = $(ele[i]);
                //取当前值，并替换掉两端空格、替换掉回车符， 检查是否和 data-value 属性的默认值 相同。
                var _val = trimCode(_e.val());
                if (_val == '') {
                    _e.val(_e.attr('data-value')); //初始化
                }
                _e.focus(function() {
                    var _val = $.trim($(this).val());
                    if ($(this).attr('data-value') == _val) {
                        $(this).val('');
                    }
                }).blur(function() {
                    var _val = $.trim($(this).val());
                    var _attrVal = $(this).attr('data-value');
                    if (_val == '') {
                        $(this).val(_attrVal);
                    }
                });
            }
        },
        /*文字滚动start*/
		Roll_txt:function(Scroll_txt){
			var bobao=Scroll_txt;
			function animator(currentItem) {
				if($(".xidi").css("display")=="none"||$(".Roll_txt").css("display")=="none"){
					return false;
				};
				//work out new anim duration
				var distance = currentItem.height();
				duration = (distance + parseInt(currentItem.css("marginTop"))) / 0.025;
		
				//animate the first child of the bobao
				currentItem.animate({ marginTop: -distance }, duration, "linear", function() {
		
					//move current item to the bottom
					currentItem.appendTo(currentItem.parent()).css("marginTop", 0);
		
					//recurse
					animator(currentItem.parent().children(":first"));
				});
		    };
		    //start the bobao
			animator(bobao.children(":first"));
		
			//set mouseenter
			bobao.mouseenter(function() {
		
				//stop current animation
				bobao.children().stop();
		
			});
		
			//set mouseleave
			bobao.mouseleave(function() {
		
				//resume animation
				animator(bobao.children(":first"));
		
			});
		},
		/*文字滚动end*/
		/*报名量滚动*/
		Quota:{
		   getnum: function(from, to) {
		      var _hour = new Date().getHours(),
		         _syNum = 144;
		      var fff = 0;
		      if(new Date().getMinutes() >= 50) {
		         fff = 1;
		      } else if(new Date().getMinutes() >= 40) {
		         fff = 2;
		      } else if(new Date().getMinutes() >= 30) {
		         fff = 3;
		      } else if(new Date().getMinutes() >= 20) {
		         fff = 4;
		      } else if(new Date().getMinutes() >= 10) {
		         fff = 5;
		      } else if(new Date().getMinutes() < 10) {
		         fff = 6;
		      };
		      var hhh = _hour * 6
		      _syNum = 144 - (hhh + fff);
		      return _syNum;
		   },
		   countDown: function(box, from, to) {
		      var item1 = box.eq(0);
		      var item2 = box.eq(1);
		      var item3 = box.eq(2);
		      var item4 = box.eq(3)
		      function design_quota() {
		         if(from >= to) {
		            render(from -= 140);
		            if(from <= to) {
		               render(to);
		            }
		            setTimeout(design_quota, 10);
		         }
		      }
		      function render(num) {
		      	if(num>1000){
		      		 var num1 = Math.floor(num / 1000);
			         var num2 = Math.floor(num / 100 % 10);
			         var num3 = Math.floor(num /10 % 10);
			         var num4 = Math.floor(num%10);
			         item1.html(num1)
			         item2.html(num2)
			         item3.html(num3)
			         item4.html(num4)
		      	}else if(num>100){
		      		 var num1 = Math.floor(num / 100);
			         var num2 = Math.floor(num / 10 % 10);
			         var num3 = Math.floor(num % 10);
			         item1.html(num1)
			         item2.html(num2)
			         item3.html(num3)
		      	}else if(num>10){
		      		 var num1 = Math.floor(num / 10);
			         var num2 = Math.floor(num % 10);
			         item1.html(num1)
			         item2.html(num2)

		      	}
		        
		      }
		      design_quota();
		   }
		},
		/*报名量滚动end*/	
		//获取前面的www或beijing等
		urlA: function() {　　　　
			var url = document.location.hostname.toString();　　　　
			var arrUrl = url.split(".");
			var start = arrUrl[0];　　　　　　　　
			return start;　　
		},
		urlB: function() {
			var url = document.location.pathname.toString();
			var arrUrl = url.split("/");
			var start = arrUrl[1];
			return start;　　
		},
		//参数说明: ele1是省(jquery对象)，ele2是市(jquery对象)
        //GP是省，GC1是市（GP和GC1 来源于 http://news.17house.com/source/plugin/znbj/template/znbj-static/provinces.js ）
        init: function(ele1, ele2, GP, GC1) {
            var html = ' ';
            var len = GP.length;
            for (var i = 0; i < len; i++) {
                html += '<option value="' + GP[i] + '">' + GP[i] + '</option>';
            }
            ele1.html(html);
            ele1.bind("change", function() {
                var html = '';
                var key = $(this).val();
                var len = GC1[key].length;
                for (var i = 0; i < len; i++) {
                    html += '<option value="' + GC1[key][i] + '">' + GC1[key][i] + '</option>';
                }
                ele2.html(html);
                //$(this).parents('form').find('select[name=User_City]').html(html);
            });

        },
		/*根据cookie城市值，获取省份*/
        getProvince: function(tempCity){
            $.each(GP,function(index,province){
                $.each(GC1[province],function(idx,city){
                    if(tempCity == city){
                        $("select[name=User_Shen]").val(province);
                    }
                });
            });
        },
         /*检查姓名*/
        checkName: function(name,errorH) {
            var $value = name.val();
            if ($value=="" || $value == name.attr('data-value')) {
                errorH.html('请填写姓名');
                name.focus();
                return false;
            }
            return true;
        },
        /*检查面积*/
        checkArea: function(ele, errorH) {
            var $value = ele.val();
            if ($value=="" || $value == ele.attr('data-value')) {
               	errorH.html('请填写面积');
                ele.focus();
                return false;
            }
             var regTest = /[0-9]$/;
            if (!regTest.test($value)) {
                errorH.html('建筑面积: 请填写数字');
                ele.focus();
                return false;
            }
            var regTest = /^(?:[0-9]{1,3}|1000)$/;
			if(!regTest.test($value)){
				errorH.html('房屋面积需为小于1000的数字');
				ele.focus();
				return false;
			}
            return true;
        },
         /*检查手机号*/
        checkPhone: function(mobile,errorH) {
            var mobileNum = mobile.val();
            if (mobileNum == '' || mobileNum == mobile.attr('data-value')) {
               	errorH.html('请填写手机号');
                mobile.focus();
                return false;
            }
            var regTest =commonJS.phoneRegular;
            if (!regTest.test(mobileNum)) {
                errorH.html('电话格式不对，请检查');
                mobile.focus();
                return false;
            }
            return true;
        },
        /*验证城市*/
        checkCity: function(City,errorH){
            if (City == '' || City == '选择您房屋所在城市') {
                errorH.html('请选择城市');
                return false;
            }
            return true;
        },
	};
	commonJS.commonJSInit();
	//遮罩
	var bgColorUp = function(){		
		var maskLayer = '<div class="maskLayer"></div>';
		$("body").append(maskLayer);
		var bh = $("body").height();
		var bw = $("body").width();
		$(".maskLayer").css({
			"position":"fixed",
			"top":"0",
			"left":"0",
			"background":"#000",
			"height": bh,
			"width": bw,
			"opacity":"0.6",
			"filter":"alpha(opacity:60)",
			"z-index":"9999"		
		});

	};
	/* 弹窗遮罩隐藏*/
	var bgColorDown= function () {
		$(".maskLayer").remove();
	};
$(function(){
		/*百度统计代码*/
	var getCookie=function(ckName) {
			if (document.cookie.length > 0) {
				var begin = document.cookie.indexOf(ckName + "=");
				if (begin != -1) {
					begin += ckName.length + 1; 
					var end = document.cookie.indexOf(";", begin); 
					if (end == -1) end = document.cookie.length;
					return decodeURIComponent(document.cookie.substring(begin, end));
				};
			};
			return null;
	};
		var reUrl = /bbs\./;
		var DQurl=window.location.href;
		var Fsurl = /semzengbin\=/;
	  if(!reUrl.test(location.href)){
//	    if(!Fsurl.test(DQurl)){
//			var Tj = document.createElement("script");
//			var H_jG="var _hmt = _hmt || [];(function() {var hm = document.createElement('script');hm.src = '//hm.baidu.com/hm.js?38cb5604807892b6a56a284c46a38cd1';var s = document.getElementsByTagName('script')[0];s.parentNode.insertBefore(hm, s);})();";
//			H_jG+="(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)})(window,document,'script','//www.google-analytics.com/analytics.js','ga');ga('create','UA-53338747-1','auto');ga('send','pageview');";
//			function isIE(){ //ie? 判断是不是ie
//				if (window.navigator.userAgent.indexOf("MSIE")>=1){
//					return true;
//				}else{
//					return false;
//				};
//				
//			}; 
//			if(isIE()){
//				Tj.text=H_jG;
//			}else{
//				Tj.innerHTML=H_jG;
//			};
//		  document.body.appendChild(Tj);
//		};
	  };
	
	//城市定位
//	$(".location_city .xuanze").html(commonJS.city()+"<i></i>");
	/* 用户名赋值 */
	var userData =  function (data) {
		$(".login_proceed").hide();
		$(".login_succeed").show();
		var user = data.username;
		$('.user').find("span").html(user);	
		var value = data.uid;
		var oDate = new Date();
		oDate.setDate(oDate.getDate() + 1);
		document.cookie = 'seri=' + encodeURIComponent(value) + ';expires=' + oDate + ';domain=' + '17house.com';
		bgColorDown();
		$('.loginBox_con').hide();
		$('.loginBox_conP').hide();
	};	
	var nav_swiper = new Swiper('.nav_swiper',{
			autoplay : 2000,//可选选项，自动滑动
			loop : true,
			mode : 'vertical'
		});
	var popLogin = function(){
		var html = '<div class="loginBox"><div class="loginBox_bg"></div><div class="loginBox_con" style="width:430px;"><div class="close">&#10005</div><div class="LBC clear"><div class="LBC_right"><p class="h3 login_lable"> <a href="javascipt:;"><i></i>短信快捷登录</a></p>';
			html +='<div class="loginBox_name clear" id="userLogin"><span></span><input id="username" type="text" value="邮箱/用户名/已验证手机"></div> <div class="loginBox_pwds clear" id="userPwd"><span></span><input id="password" type="password">';
			html +='<p class="pwdtxt">请输入密码</p></div><div class="error_show"><span id="userSpan"></span></div><div class="loginBox_checkbox clear"><input type="checkbox" checked="checked"><div>自动登陆</div> <span><a href="http://passport.17house.com/forgetpwd">忘记密码</a></span></div>';
			html +='<div class="loginBox_btn">立即登录</div><div class="loginBox_qita"> <p class="h4">您还可以使用合作账号登录网站：</p> <ul class="list clear"><li><a class="list_img1" href="javascript:;" target="_blank"></a></li><li><a class="list_img2" id="sinaLogin" href="http://passport.17house.com/login/SinaAccessToken?goto='+window.location.href+'"></a></li> <li><a class="list_img3" href="javascript:void(0);"></a></li> </ul> <p>还没有一起网帐号？10秒钟,<a href="http://passport.17house.com/reg" target="_blank">快速注册</a></p>';
			html +='</div></div> </div></div><div class="poplayer2 pop-wechat-code"><span class="close js-close">&#10005</span><div class="layout430 tc mb30"><p class="title h4">微信账号登陆</p><p class="mt20"><img src="" height="214" width="211" alt="二维码" id="weixin_login"></p><p class="p14 mt10">微信扫一扫绑定/登录</p>';
			
			html +='</div></div><div class="loginBox_conP" style="width:430px;"><div class="close">&#10005</div><div class="LBC clear"><div class="LBC_right"><p class="back"><s></s>返回登录</p><div class="loginBox_res">验证即登录，未注册将自动创建一起网帐号</div> <div class="loginBox_name clear">';
			html +='<i></i><input name="usermobile" class="LBC_tel" id="userMobile" type="text" value="请输入手机号码"></div><div class="yanzhengma"><input tip="验证码" name="code" maxlength="4" id="YZMcode" type="text" value="输入验证码" style="color: rgb(204, 204, 204);"><img alt="点击换图" title="点击换图" style="cursor:pointer" id="yw0" src="http://passport.17house.com/captcha/captcha/?ref=1&t='+new Date().getTime()+'"></div> <div class="loginBox_pwd clear"> <div class="loginBox_pwdL clear"><span></span><input type="text" name="vcode" id="vcode" value="请输入动态密码"> </div> <div class="loginBox_pwdR" name="sendSMS">获取动态密码</div></div>';
			html +='<div class="error_show"><span class="alert_phone_login"></span></div><div class="loginBox_btn1" style="margin-top:10px">立即登录</div><div class="loginBox_qita">';
			html +='<p>还没有一起网帐号？10秒钟,<a href="http://passport.17house.com/reg" target="_blank">快速注册</a></p> </div> <!-- 下面这个隐藏字段是为了存储今日短信发送是否超过10条 --><input type="hidden" name="for_isBeyondLimit" value="" /><!-- 区分当前页面是否处于计时的字段    0表示当前页面没有进行计时--><input type="hidden" name="for_timing" value="0" /><!-- 下面这个隐藏表单是为了存放间歇调用的ID的 --><input type="hidden" name="for_intervalId" value="" /><!-- 下面这个隐藏表单是为了存放authkey --><input type="hidden" id="authkey" value="" />';
			html +=' </div> </div> </div> </div>';
			$("body").append(html);
	};
	popLogin();
	//查看是否登陆
	var str = "http://passport.17house.com/login/NewIsLogin?&callback=?";
	$.getJSON(str, function(data) {
		if(data.authkey != '') {
			$("#authkey").val(data.authkey);
		}
		if(data.status == 1) {
//			userData(data);
			$(".login_proceed").hide();
			$(".login_succeed").show();
			var user = data.username;
			$('.user').find("span").html(user);	
			var value = data.uid;
			var oDate = new Date();
			oDate.setDate(oDate.getDate() + 1);
			document.cookie = 'seri=' + encodeURIComponent(value) + ';expires=' + oDate + ';domain=' + '17house.com';
		}
	});

	/* 登陆功能 */
	$('.loginBox_btn').click(function() {
		login();
	});

	/* 手机登录 */
	$('.loginBox_btn1').click(function() {
		mobileLogin();
	});

	/* QQ登录 */
	$('.list_img1').click(function() {
		toQzoneLogin();
	});
//	WB2.anyWhere(function(W){
//		console.log("abc")
//		//如果有登陆，那么退出
//		if(WB2.checkLogin())
//		{
//			console.log(1)
//			WB2.logout(function(){});
//		}
//      W.widget.connectButton({
//          id: "sinaLogin",
//          type: '3,2',
//          callback : {
//              login:function(o){
//              	console.log(12)
//					var nickname = encodeURIComponent(o.name).replace(/%/g, "|");
//					var id = encodeURIComponent(o.id).replace(/%/g, "|");//高言加
//					var avatar = encodeURIComponent(o.avatar_large);
//                  //var redirect_uri = "http://passport.17house.com/login/sinacode/"+sinacode+"/nickname/" + nickname;//原代码
//					//必须把某一个唯一值传过去，要不然第三方表里面不能保存该微博
////					var redirect_uri = "http://passport.17house.com/login/sinacode/nickname/" + nickname+"/token/"+id+"/?avatar="+avatar;//高言加
////                  var url = "https://api.weibo.com/oauth2/authorize?client_id=2075811979&redirect_uri=" + redirect_uri;
//                  console.log("名字:"+nickname+"----"+"id:"+id+"----"+"avatar:"+avatar);
////                  location.href =  url;
//                  
//              },
//              logout:function(){
//                  //alert('logout');
//                  console.log(3)
//              }
//          }
//      });
//  });
/**
		弹出iframe页面(iframe后面会添加灰色蒙版)
	**/
	function showIframe(url,w,h){
	    //添加iframe
	    var if_w = w; 
	    var if_h = h; 
	    //allowTransparency='true' 设置背景透明
	    $("<iframe width='" + if_w + "' height='" + if_h + "' id='YuFrame1' name='YuFrame1' style='position:absolute;z-index:4;'  frameborder='no' marginheight='0' marginwidth='0' allowTransparency='true'></iframe>").prependTo('body');    
	    var st=document.documentElement.scrollTop|| document.body.scrollTop;//滚动条距顶部的距离
	    var sl=document.documentElement.scrollLeft|| document.body.scrollLeft;//滚动条距左边的距离
	    var ch=document.documentElement.clientHeight;//屏幕的高度
	    var cw=document.documentElement.clientWidth;//屏幕的宽度
	    var objH=$("#YuFrame1").height();//浮动对象的高度
	    var objW=$("#YuFrame1").width();//浮动对象的宽度
	    var objT=Number(st)+(Number(ch)-Number(objH))/2;
	    var objL=Number(sl)+(Number(cw)-Number(objW))/2;
	    $("#YuFrame1").css('left',objL);
	    $("#YuFrame1").css('top',objT);
	 
	    $("#YuFrame1").attr("src", url)
	 
	    //添加背景遮罩
	    $("<div id='YuFrame1Bg' style='background-color: Gray;display:block;z-index:3;position:absolute;left:0px;top:0px;filter:Alpha(Opacity=30);/* IE */-moz-opacity:0.4;/* Moz + FF */opacity: 0.4; '/>").prependTo('body'); 
	    var bgWidth = Math.max($("body").width(),cw);
	    var bgHeight = Math.max($("body").height(),ch);
	    $("#YuFrame1Bg").css({width:bgWidth,height:bgHeight});
	 
	    //点击背景遮罩移除iframe和背景
	    $("#YuFrame1Bg").click(function() {
	        $("#YuFrame1").remove();
	        $("#YuFrame1Bg").remove();
	    });
	};
//	$("#sinaLogin").on("click",function(){
//		$(".loginBox .close").click();
//		showIframe('http://passport.17house.com/login/SinaAccessToken',600,400);
//	});
    
	/* 登录弹窗 */
	$('.denglu').click(function() {
		bgColorUp();
		$('.loginBox_con').show();
		$(".loginBox_btn").on("click", '.loginBox_btn', login);
		$(".loginBox_btn1").on("click", '.loginBox_btn1', mobileLogin);
	});

	/* 关闭弹窗 */
	$('.close').click(function() {
		bgColorDown();
		$('.loginBox_con').hide();
		$('.loginBox_conP').hide();
	});

	/* 登录切换 */
	$('.LBC_right .login_lable').click(function() {
		$('.loginBox_con').hide();
		$('.loginBox_conP').show();
	});

	$('.back').click(function() {
		$('.loginBox_con').show();
		$('.loginBox_conP').hide();
	});

	/* 退出登录 */
	$('.siteNavBgRS_list li:last a').click(function() {
		$('.siteNavBgRS_list').hide();
		$('.siteNavBgRS').hide();
		$('.siteNavBgR').show();
	});

	/* 退出登录功能  */
	$('#logout').click(function() {
		logout();
	});
	//用户登陆 模块错误提示
	$('#password').focus(function() {
		$('.pwdtxt').hide();
	}).blur(function() {
		if($('#password').val() == '') {
			$('.pwdtxt').show();
		};
	});
		/*用户登陆 获取焦点 失去焦点*/
	$("#username,#userMobile,#vcode,#YZMcode,#yourName,#yourTel,#applyName,#applyTel,#FRtable_name,#FRtable_tel,.comment_box input.tel,#commonText").mousedown(function() {
		$(this).focus(function() {
			if(this.value || $('#commonText').value == this.defaultValue) {
				this.value = "";
			}
			$(this).removeClass("showBox");
			$(".error_b1").html("");
			$(".error_b2").html("");
			$("#name_error").html("");
			$("#tel_error").html("");
		});
		$(".LBC_tel,.comment_box input.tel").keyup(function() {
			var tmptxt = $(this).val();
			$(this).val(tmptxt.replace(/\D|^0/g, ''));
		}).bind("paste", function() {
			var tmptxt = $(this).val();
			$(this).val(tmptxt.replace(/\D|^0/g, ''));
		});
	}).mouseup(function() {
		$(this).blur(function() {
			if(this.value == "" || $('#commonText').value == "") {
				this.value = this.defaultValue;
				$('#commonText').val('我们非常重视您的建议，请在这里填写告诉我们');
			}
			$(this).html("");
			$(this).removeClass("showBox");
		});
	});

	$('.pwdtxt').click(function() {
		$('.pwdtxt').hide();
		$('#password').focus();
	}).mouseup(function() {
		$('.pwdtxt').show();
		$('#password').blur();
	});
	/* 用户名登陆func */
	var login = function () {
			var username = $("#username").val();
			var password = $("#password").val();
			var key = $("#authkey").val();
		
			password = basePwd(password, key); //对输入密码进行base64编码
			if(username != "" && username != "邮箱/用户名/已验证手机" && password != "") {
				$("#userLogin").removeClass("show");
				$("#userPwd").removeClass("show");
				$("#userSpan").show().html("");
				$(".loginBox_btn").off("click", '.loginBox_btn', login);
				var str = "http://passport.17house.com/login/NewLogin?username=" + username + "&password=" + password + "&callback=?";
				$.getJSON(str, function(data) {
					if(data.status == 1) {
						userData(data);
						$("head").append(data.msg);
					} else {
						$("#userSpan").show().html("用户名或密码错误");
						$(".loginBox_btn").on("click", '.loginBox_btn', login);
					}
				});
			} else {
				if(username == "邮箱/用户名/已验证手机") {
					username = "";
				}
				if(username == "" && password == "") {
					$("#userLogin").addClass("show");
					$("#userPwd").addClass("show");
				} else if(password == "") {
					$("#userPwd").addClass("show");
				} else if(username == "") {
					$("#userLogin").addClass("show");
				}
				$("#userSpan").show().html("用户名或密码不能为空");
				return false;
			}
		};
	/**
	 * base64编码
	 * @2015-07-23
	 * @param str str
	 * return str
	 */
	var base64encode =function (str) {
		var out, i, len;
		var c1, c2, c3;
		var base64EncodeChars = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
		len = str.length;
		i = 0;
		out = "";
		while(i < len) {
			c1 = str.charCodeAt(i++) & 0xff;
			if(i == len) {
				out += base64EncodeChars.charAt(c1 >> 2);
				out += base64EncodeChars.charAt((c1 & 0x3) << 4);
				out += "==";
				break;
			}
			c2 = str.charCodeAt(i++);
			if(i == len) {
				out += base64EncodeChars.charAt(c1 >> 2);
				out += base64EncodeChars.charAt(((c1 & 0x3) << 4) | ((c2 & 0xF0) >> 4));
				out += base64EncodeChars.charAt((c2 & 0xF) << 2);
				out += "=";
				break;
			}
			c3 = str.charCodeAt(i++);
			out += base64EncodeChars.charAt(c1 >> 2);
			out += base64EncodeChars.charAt(((c1 & 0x3) << 4) | ((c2 & 0xF0) >> 4));
			out += base64EncodeChars.charAt(((c2 & 0xF) << 2) | ((c3 & 0xC0) >> 6));
			out += base64EncodeChars.charAt(c3 & 0x3F);
		}
		return out;
	}
	var basePwd = function (password, key) {
		var pos = key.substr(3, 3);
		var key = key.substr(0, 3);
		var fpass = "";
		var arr = password.split("");
		for(i = 0; i < pos.length; i++) {
			arr.splice(pos[i], 0, key[i]);
		}
		var password = arr.join("");
		password = base64encode(password);
		return password;
	};
	/* 手机号登陆func */
	var mobileLogin = function () {
		var usermobile = $("input[name=usermobile]").val();
		var vcode = $("input[name=vcode]").val();
	
		if(usermobile == "请输入手机号码" || !usermobile) {
			$(".loginBox_name").addClass("show");
			$(".alert_phone_login").show().html("请输入手机号码");
			return false;
		} else {
			$(".loginBox_name").removeClass("show");
			$(".alert_phone_login").show().html("");
		}
	
		var reg = commonJS.phoneRegular;
		if(!reg.test(usermobile)) {
			$(".loginBox_name").addClass("show");
			$(".alert_phone_login").show().html("手机格式不正确");
			return false;
		} else {
			$(".loginBox_name").removeClass("show");
			$(".alert_phone_login").show().html("");
		}
		
		if(!vcode || vcode == "请输入动态密码") {
			$(".loginBox_pwdL").addClass("show");
			$(".alert_phone_login").show().html("请输入动态密码");
			return false;
		} else {
			$(".loginBox_pwdL").removeClass("show");
			$(".alert_phone_login").show().html("");
		}
		$(".loginBox_btn1").removeAttr("onclick");
		var str = "http://passport.17house.com/login/NewDoLoginByMobile?usermobile=" + usermobile + "&vcode=" + vcode + "&callback=?";
		$.getJSON(str, function(data) {
			if(data.status == 1) {
				userData(data);
				$("head").append(data.msg);
				return false;
			} else if(data.status == 0) {
				$(".alert_phone_login").show().html("手机号未注册");
				return false;
			} else if(data.status == 2) {
				$(".alert_phone_login").show().html("验证码不正确");
				$(".loginBox_btn1").attr("onclick", "mobileLogin();");
				return false;
			} else {
				$(".alert_phone_login").show().html("登陆失败");
				return false;
			}
		});
	};
	$("#logout").on("click",function(){
		
	});
	/* 退出登陆 */
var logout = function () {var str = "http://passport.17house.com/login/NewLogout?callback=?";
		$.getJSON(str, function(data) {
			if(data.status == 1) {
				commonJS.delCookie("seri");
//				$("head").append(data.msg);
				$(".login_proceed").show();
				$(".login_succeed").hide();	
			} ;
		});}

/* qq登陆 */
 var toQzoneLogin= function () {
	var pageWidth = window.innerWidth,
		pageHeight = window.innerHeight;
	if(typeof pageWidth != "number") {
		if(document.compatMode == "CSS1Compat") {
			pageWidth = document.documentElement.clientWidth;
			pageHeight = document.documentElement.clientHeight;
		} else {
			pageWidth = document.body.clientWidth;
			pageHeight = document.body.clientHeight;
		}
	}
	childWindow = window.open("http://passport.17house.com/login/QQAuthPHPSDK?goto="+window.location.href, "TencentLogin", "width=" + pageWidth + ",height=" + pageHeight + ",menubar=0,scrollbars=1, resizable=1,status=1,titlebar=0,toolbar=0,location=1");
};
	//友情链接
	$(".friendLink_nav li").each(function(index){
		$(this).on("click",function(){
			$(".friendLink_nav li").removeClass("show");
			$(this).addClass("show");
			$(".friendLink_con").find(".FLlist").removeClass("show");
			$(".friendLink_con").find(".FLlist").eq(index).addClass("show");
		});
	});
var timeLeft = 60;
	//为下面这个单击发送短信按钮准备函数
	var decrease = function() {
		timeLeft--;
		if(timeLeft == 0) {
			$('[name=sendSMS]').html('获取动态验证码');
			$('.send_code').prop('disabled', false);
			//计时执行完毕，将相关标志位置0，0表示当前页面没有计时
			$('[name=for_timing]').val('0');
			timeLeft = 60
			window.clearInterval(intervalId);
			$('[name=for_intervalId]').val('');
			return;
		}
		$('[name=sendSMS]').html(timeLeft + "秒后可重新发送");
	};
	$("#yw0").on("click",function(){
		var timestamp=new Date().getTime();
		$(this).attr({
			"src":"http://passport.17house.com/captcha/captcha/?ref=1&t="+timestamp
		})
	});
	$('[name="sendSMS"]').click(function() {
		var mobile = $("input[name=usermobile]").val();

		//验证手机是否符合要求
		var reg =commonJS.phoneRegular;
		if(!reg.test(mobile)) {
			alert("手机格式不正确");
			//手机字段获得焦点
			$("input[name=usermobile]").focus();
			$("input[name=usermobile]").val('');
			return false;
		}
		//验	证验证码是否为空,后端验证验证码是否正确
		if($("#YZMcode").val()==""||$("#YZMcode").val()=="输入验证码"){
			$("#YZMcode").focus();
			$(".alert_phone_login").show().html("验证码不能为空");
			return false;
		}
		//将上次的提示信息注释掉
		$('#vcode_msg').html('');
		//执行发送短信函数
		if(timeLeft == 60) {
			sendSMSVcode(mobile,$("#YZMcode").val());
		}
		var isBeyondLimit = $('[name=for_isBeyondLimit]').val();
		if(isBeyondLimit == '0') {
			alert("每日最多发送10条短信");
			return;
		}
		var intervalID = null;
		//进行判断，看看是否已经有计时在运行
		var isInTiming = $("[name=for_timing]").val();
		//0表示当前页面没有计时
		if(isInTiming == 0) {
			$("[name=for_timing]").val('1');
			intervalId = setInterval(decrease, 1000);
			$('[name=for_intervalId]').val(intervalId);
		}
	});
	/* 发送短信func */
	function sendSMSVcode(mobile,yancode) {
		var str = "http://passport.17house.com/login/NewSendSMSForMobileLogin?mobile=" + mobile + "&code="+yancode+"&callback=?";
		$.getJSON(str, function(data) {
			if(data.status == 0) {
				alert(data.msg);
				$('[name=for_isBeyondLimit]').val(data);
			}
		});
	
	};
	/*微信登录弹框*/
	var timer;
	/*微信登录弹框*/
	$('.loginBox_con .list_img3').on('click', function() {
		var random = '';
		$.getJSON('http://weixin.17house.com/weixin/api.php?callback=?', function(data) {
			$(".pop-wechat-code .layout430 img").attr("src",data.url) ;
			random = data.key;
		});
		$('.pop-wechat-code,.popmask').show();
		$('.loginBox_con').hide();
		$('.loginBox_conP').hide();
		timer = setInterval(function() {
			$.getJSON('http://passport.17house.com/login/Wxtest?key=' + random + '&callback=?', function(data) {
				if(data) {
					clearInterval(timer);
					$('.js-close').click();
					try {
						$.getJSON($.trim(data) + '/?callback=?', function(data) {
							$('body').append(data);
							var str = "http://passport.17house.com/login/NewIsLogin?&callback=?";
							$.getJSON(str, function(data) {
								if(data.authkey != '') {
									$("#authkey").val(data.authkey);
								}
								if(data.status == 1) {
									userData(data);
								}
							});
						});
					} catch(e) {}
				}
			});
		}, 1000);
	});
	$('.pop-wechat-code .close').on('click', function() {
		$('.pop-wechat-code,.popmask').hide();
		clearInterval(timer);
	});
	//在线咨询
	$(".footer .zixunBtn").on("click",function(){
		//openZoosUrl('chatwin','&e=pcyouce');
		window.open("http://q.url.cn/abDkbH?_type=wpa&qidian=true");
	});
	var TKPcSuc={
		DomShow:function(){
			var TKhtml='';
			TKhtml+='<!--共用PC成功弹出框start-->';
			TKhtml+='<div class="TK_succ_div">';
			TKhtml+='<input type="hidden" name="TK_name" class="TK_name" value="">';
			TKhtml+='<input type="hidden" name="TK_phone" class="TK_phone" value="">';
			TKhtml+='<input type="hidden" name="TK_city" class="TK_city" value="">';
			TKhtml+='<input type="hidden" name="TK_key" class="TK_key" value="">';
			TKhtml+='<input type="hidden" name="TK_channelFirst" class="TK_channelFirst" value="">';
			TKhtml+='<input type="hidden" name="TK_channelSecond" class="TK_channelSecond" value="">';
			TKhtml+='<input type="hidden" name="TK_channelKey" class="TK_channelKey" value="">';
			TKhtml+='<input type="hidden" name="TitleName" class="TitleName" value="">';
			TKhtml+='<input type="hidden" name="TK_smstype" class="TK_smstype" value="">';
			TKhtml+='<p class="TK_succ_close"><img src="http://s1.17house.com/common/Succ_baom/common/images/TK_close.png" alt="关闭按钮" class="img_close"></p>';
			TKhtml+='<p class="TK_succ_title">感谢您的申请！</p>';
			TKhtml+='<p class="TK_succ_smtitle smtitle_default">稍后装修管家会与您致电,了解您的具体装修需求,请保持电话畅通,谢谢!</p>';
			TKhtml+='<p class="TK_succ_smtitle smtitle_gongdi">稍后装修管家会与您致电，预约看工地的具体时间。请保持电话畅通，谢谢！</p>';
			TKhtml+='<p class="TK_succ_smtitle smtitle_daikuan">稍后装修管家会与您致电，为您讲述快速放贷具体需求。请保持电话畅通，谢谢！</p>';
			TKhtml+='<p class="TK_succ_smtitle smtitle_sheji">15分钟内装修专家会与您电话联系，了解具体装修需求，请留意接听来电。</p>';
			TKhtml+='<p class="TK_succ_smtitle smtitle_baojia">15分钟内一起装修网专家将为您讲解如何根据房屋特点来测算装修报价，避免后期增项陷阱。请留意接听来电。</p>';
			TKhtml+='<p class="TK_succ_smtitle smtitle_zhengzhuang">15分钟内一起装修网专家将电话为您讲解如何根据您的户型设计扩容方案，请留意接听来电。</p>';
			TKhtml+='<div class="TK_inp inp_date_father">';
			TKhtml+='<p><span class="TK_inp_stress">*</span><span class="TK_inp_date">选择预计装修的时间</span></p>';
			TKhtml+='<div class="TK_date">';
			TKhtml+='<p class="TK_date_title">选择预计装修的时间</p>';
			TKhtml+='<ul class="TK_date_ul"></ul>';
			TKhtml+='</div></div>';
			TKhtml+='<p class="TK_inp">';
			TKhtml+='<input type="text" class="TK_inp_son1 TK_inp_son2 TK_area" value="填写房屋面积" data-value="填写房屋面积" maxlength="3">';
			TKhtml+='<span class="TK_inp_square">m<i>2</i></span>';
			TKhtml+='</p>';
			TKhtml+='<p class="TK_inp">';
			TKhtml+='<input type="text" class="TK_inp_son1 TK_inp_son2 TK_village" value="请填写您的小区名称" data-value="请填写您的小区名称" maxlength="25">';
			TKhtml+='</p>';
			TKhtml+='<p class="TK_errortip"></p>';
			TKhtml+='<p class="TK_js_btn">提交</p>';
			TKhtml+='<p class="TK_attention"><img src="http://s1.17house.com/common/Succ_baom/common/images/TK_attention.png" alt="注意事项">由于当前申请人数较多，完善资料的业主将得到优先服务</p>';
			TKhtml+='</div>';
			TKhtml+='<div class="TK_aftersucc">';
			TKhtml+='<p class="TK_succ_close"><img src="http://s1.17house.com/common/Succ_baom/common/images/TK_close.png" alt="关闭按钮" class="img_close"></p>';
			TKhtml+='<p class="TK_succ_TrueImg"><img src="http://s1.17house.com/newweb/pc/common/images/greentrue.png" /></p>';
			TKhtml+='<p class="TK_succ_title">恭喜您预约成功！</p>';
			TKhtml+='<p class="TK_succ_smtitle smtitle_default">稍后装修管家会与您致电,了解您的具体装修需求,请保持电话畅通,谢谢!</p>';
			TKhtml+='<p class="TK_succ_smtitle smtitle_gongdi">稍后装修管家会与您致电，预约看工地的具体时间。请保持电话畅通，谢谢！</p>';
			TKhtml+='<p class="TK_succ_smtitle smtitle_daikuan">稍后装修管家会与您致电，为您讲述快速放贷具体需求。请保持电话畅通，谢谢！</p>';
			TKhtml+='<p class="TK_succ_smtitle smtitle_sheji">15分钟内装修专家会与您电话联系，了解具体装修需求，请留意接听来电。</p>';
			TKhtml+='<p class="TK_succ_smtitle smtitle_baojia">15分钟内一起装修网专家将为您讲解如何根据房屋特点来测算装修报价，避免后期增项陷阱。请留意接听来电。</p>';
			TKhtml+='<p class="TK_succ_smtitle smtitle_zhengzhuang">15分钟内一起装修网专家将电话为您讲解如何根据您的户型设计扩容方案，请留意接听来电。</p>';
			TKhtml+='<ul class="TK_succ_Aul clearfix">';
			TKhtml+='<li class="l ml30 mr5"><i class="i1"></i></li>';
			TKhtml+='<li class="l"><span>8年服务800万</span></li>';
			TKhtml+='<li class="l Aul-thirdLi mr5"><i class="i2"></i></li>';
			TKhtml+='<li class="l"><span>上市互联网装修平台</span></li>';
			TKhtml+='</ul>';
			TKhtml+='</div>';
			TKhtml+='<div class="TK_succ_mc"></div>';
			TKhtml+='<div class="TK_afteragain">';
			TKhtml+='<p class="TK_succ_close"><img src="http://s1.17house.com/common/Succ_baom/common/images/TK_close.png" alt="关闭按钮" class="img_close"></p>';
			TKhtml+='<p class="TK_succ_title">您已申请过此项服务</p>';
			TKhtml+='<p class="TK_succ_smtitle">15分钟内装修专家会与您电话联系，了解具体装修需求，请留意接听来电。</p>';
			TKhtml+='<p class="TK_succ_erweima"><img src="http://s1.17house.com/common/images/weixin_03.png" alt="二维码"></p>';
			TKhtml+='<p class="TK_succ_sao">微信扫一扫</p>';
			TKhtml+='<p class="TK_succ_add">领取装修大礼包，红包领不停</p>';
			TKhtml+='<p class="TK_succ_btn">关闭</p>';
			TKhtml+='</div>';
			TKhtml+='<!--共用PC成功弹出框end-->';
			$("body").append(TKhtml);
		},
		PullSwiperData:function(){
			$.ajax({
				type:"GET",
				url:"http://cms.17house.com/adsApi/getByPid?pid=210&limit=10",
				dataType:"jsonp",
				timeout:0,
				contentType:"application/json;utf-8",
				success:function(data){
					var html='';
					html+='<div class="TK_succ_swiperBox swiper-container" >';
					html+='<div class="swiper-wrapper">';
					$.each(data.data,function(i,val){
						html+='<div class="swiper-slide">\
							<a href="'+val.url+'" title="'+val.name+'">\
								<img class="img" src="'+val.path+'" alt="'+val.name+'" />\
							</a>\
						</div>';
					})
					html+='</div>';
					html+='<div class="TK_succ_swiperBox_pagination pagination"></div></div>';
					html+='</div>';
					if(!$("#SwiperDomBox").length){
						$("body").append('<div style="display:none;" id="SwiperDomBox">'+html+'</div>');
					}
				},
				error:function(data){
					console.log(data);
				}
			});
		},
		PullSwiperInit:function(){
			$(".TK_aftersucc .TK_succ_swiperBox").remove();
			$(".TK_aftersucc").append($("#SwiperDomBox").html());
			var swiperFn2 = function(){
				var mySwiper = new Swiper('.TK_aftersucc .TK_succ_swiperBox',{
					slidesPerView: "auto",
					autoplay : 2000,
					loop : true,
					centeredSlides:true,
					pagination : '.TK_aftersucc .TK_succ_swiperBox .TK_succ_swiperBox_pagination',
					paginationClickable :true,
					autoplayDisableOnInteraction:false
				});
			};
			swiperFn2();
		},
		/* 表单输入框获取焦点、失去焦点 */
	    focusBlur: function(ele) {
	        function trimCode(s) {
	            s = $.trim(s);
	            s = s.replace(/ /g, '');
	            s = s.replace(/\t/g, '');
	            s = s.replace(/\r/g, '');
	            s = s.replace(/\n/g, '');
	            return s;
	        }
	        for (var i = 0; i < ele.length; i++) {
	            var _e = $(ele[i]);
	            //取当前值，并替换掉两端空格、替换掉回车符， 检查是否和 data-value 属性的默认值 相同。
	            var _val = trimCode(_e.val());
	            if (_val == '') {
	                _e.val(_e.attr('data-value')); //初始化
	            }
	            _e.focus(function() {
	                var _val = $.trim($(this).val());
	                if ($(this).attr('data-value') == _val) {
	                    $(this).val('');
	                }
	            }).blur(function() {
	                var _val = $.trim($(this).val());
	                var _attrVal = $(this).attr('data-value');
	                if (_val == '') {
	                    $(this).val(_attrVal);
	                }
	            });
	        }
	    },
	    Close:function(){
	    	//点击关闭按钮关闭弹层
	    	$(".TK_succ_div .img_close,.TK_aftersucc .img_close,.TK_aftersucc .TK_succ_btn,.TK_afteragain .TK_succ_btn,.TK_afteragain .img_close").on("click",function(){
	    		$('.TK_errortip').html('');
				$(".TK_succ_div").hide();
				$(".maskLayer").remove();
				$(".TK_aftersucc").hide();
				$(".TK_afteragain").hide();
				if($(".loginBox_bg").length>0){
					$(".loginBox_bg").css({
						height: 0,
						width: 0
					});
				}
	    	});
	    	//按ESC关闭所有弹层
//			$(document).on("keydown",function(ev){
//				if(ev.keyCode==27){
//					$('.TK_errortip').html('');
//					$(".TK_succ_div").hide();
//					$(".maskLayer").remove();
//					$(".TK_aftersucc").hide();
//					$(".TK_afteragain").hide();
//				}
//			});
	    },
	    onFocus:function(){
	    	var fl=true;
	    	$(".inp_date_father").on("click",function(e){
	    		if(fl){
	    			$(document).unbind();
	    			var evt = e ? e:window.event;
					evt.stopPropagation();
					$(".TK_date").slideDown();
	    		}
	    		fl=false;
	    		if(!fl){
	    			$(document).bind("click",function(e){
	    				if($(".TK_date").css("display")=="block"){
	    					$(".TK_date").slideUp();
	    				}
						e.stopPropagation();
					});
					fl=true;
	    		}
	    		$(".TK_date").bind("click",function(e){
	    			$(document).unbind();
					$(".TK_date").slideUp();
					e.stopPropagation();
				});
	    	});
	    },
	    Getdate:function(){
	    	var today=new Date();
			var y=today.getFullYear();
			var m=today.getMonth()+1;
			var DateHtml='',
				LastDate='<li class="TK_date_li"><span class="date_li_sp1">一年以后</span><span class="date_li_sp2"></span></li>';
			for(i=0;i<11;i++){
				DateHtml+='<li class="TK_date_li">';
				DateHtml+='<span class="date_li_sp1">'+m+'月</span>';
				DateHtml+='<span class="date_li_sp2">'+y+'年</span>';
				DateHtml+='</li>';
				if(m<12){
					m++;
				}else{
					m=1;
					y++;
				}
			}
			$(".TK_date_ul").append(DateHtml);
			$(".TK_date_ul").append(LastDate);
			$(".TK_date_li").eq(0).addClass("TK_date_li_green");
		},
		ClickGreen:function(){
			$(".TK_date_li").on("click",function(){
				var $ClassName=$(this).attr("class");
				var $ThisSp1=$(this).find(".date_li_sp1").html();
				var $ThisSp2=$(this).find(".date_li_sp2").html();
				if($ClassName=="TK_date_li"){
					$(this).addClass("TK_date_li_green");
					$(this).siblings(".TK_date_li").removeClass("TK_date_li_green");
				}
				var $DateWord=$ThisSp2+$ThisSp1;
				$(".TK_inp_date").html($DateWord);
				$(".TK_date").slideUp();
			});
		},
	    /*检查日期*/
	    checkTime: function(ele, value) {
	        var $value = ele.html(),
	        	$parent = ele.closest("div");
	        if (!$value || $value == value) {
	           	$(".TK_succ_div").find('.TK_errortip').html('选择预计装修的时间');
	            return false;
	        }
	        return true;
	    },
	    /*检查面积是否为数字*/
	    checkArea: function(ele, value) {
	        var $value = ele.val(),
	            $parent = ele.closest("div");
	        //      if (!$value || $value == value) {
	//         	$parent.find('.TK_errortip').html('请填写房屋面积');
	//          $(".TK_area").focus();
	//          return false;
	//      }
			if($value != value){
				var regTest = /[0-9]$/;
		        if (!regTest.test($value)) {
		            $parent.find('.TK_errortip').html('建筑面积处请填写数字');
		            ele.focus();
		            return false;
		        }
			}
	        return true;
	    },
	    /*检查小区名*/
	    checkVillage: function(ele, value) {
	        var $value = ele.val(),
	            $parent = ele.closest("div");
	        if (!$value || $value == value) {
	           	$parent.find('.TK_errortip').html('请填写您的小区名称');
	            ele.focus();
	            return false;
	        }
	        return true;
	    },
		BtnSignUp:function(){
			$(".TK_js_btn").on("click",function(){
				var $time=$(".TK_succ_div").find(".TK_inp_date");
				var $timehtml=$time.html();
				if($timehtml=="一年以后"){
					var today=new Date();
					var y=today.getFullYear();
					var m=today.getMonth()+1;
					$timehtml=y+1+"年"+m+"月1日";
				}else{
					$timehtml+="1日";
				}
				var $name=$(".TK_succ_div").find(".TK_name");
				var $phone=$(".TK_succ_div").find(".TK_phone");
				var $area=$(".TK_succ_div").find(".TK_area");
				var $village=$(".TK_succ_div").find(".TK_village");
				var $smstype=$(".TK_succ_div").find(".TK_smstype");
	//			var $city=$city?location.hostname.split(".")[1]: 'beijing';
				var $city=$(".TK_succ_div").find(".TK_city").val();
				if($city==''){
					$city=$city?location.hostname.split(".")[1]: 'beijing';
				}
				var $channelFirst=$(".TK_succ_div").find(".TK_channelFirst");
				var $channelSecond=$(".TK_succ_div").find(".TK_channelSecond");
				var $channelKey=$(".TK_succ_div").find(".TK_channelKey");
				//cookie拿落地页
				var $firsturl=commonJS.getCookie("userMail") || document.referrer;
				var $secondurl=window.location.href;
				//时间
	            if(!TKPcSuc.checkTime($time,'选择预计装修的时间')){
	            	return false;
	            }
	            //面积
	            if (!TKPcSuc.checkArea($area, '填写房屋面积')) {
	                return false;
	            }
	            //小区名称,需求暂时不用，留着备用
	//          if (!TKPcSuc.checkVillage($village, '请填写您的小区名称')) {
	//              return false;
	//          }
	            $.ajax({
	                type: "GET",
	                url: "http://appapi.17house.com/ZnbjApi.php?action=znbjCalculatorNew&callback=?",
	                jsonp: "callback",
	                dataType: "jsonp",
	                data: { name:$name.val(),mobile:$phone.val(),channelFirst:$channelFirst.val(),channelSecond:$channelSecond.val(),channelKey:$channelKey.val(),cityName:$city,zxdate:$timehtml,square:$area.val(), community:$village.val(),smsType:$smstype.val(),referrerFirst:$firsturl,referrerSecond:$secondurl},
	                success: function(data) {
						$('.TK_errortip').html('');
						$(".TK_succ_div").hide();
						$(".TK_aftersucc").show();
						TKPcSuc.PullSwiperInit();
	                },
	                error:function(){
	                	$('.TK_errortip').html('');
	                	console.log("errorfunction！");
	                }
	               })
	            
			});
		}
	}
	TKPcSuc.DomShow();//盒子显现
	TKPcSuc.focusBlur($('.TK_inp_son1')); //input获取焦点
	TKPcSuc.Close();//关闭
	TKPcSuc.onFocus();//日期框显现
	TKPcSuc.Getdate();//获取当前时间，并顺延
	TKPcSuc.ClickGreen();//点击li变色
	TKPcSuc.BtnSignUp();//提交按钮
	TKPcSuc.PullSwiperData();
});

/**********************************************************************公共头部  end***********************************************************************/

/***********************智能报价-底部随屏 2016-12-29****************/
jQuery(function($) {
    var window_box = function(){
    	var suipingBox = {    		
    		pushHtml:function(){
    			var newTime = new Date();
    			var m = newTime.getMonth() + 1;
    			var oneMonth="",twoMonth="",threeMonth="";
    			switch (m){
    				case 12:
	    				oneMonth=(newTime.getFullYear()+1)+"年"+"1月1日";
	    				twoMonth=(newTime.getFullYear()+1)+"年"+"2月1日";
	    				threeMonth=(newTime.getFullYear()+1)+"年"+"3月1日";
    					break;
    				case 11:
	    				oneMonth=(newTime.getFullYear())+"年"+"12月1日";
	    				twoMonth=(newTime.getFullYear()+1)+"年"+"1月1日";
	    				threeMonth=(newTime.getFullYear()+1)+"年"+"2月1日";
    					break;
    				case 10:
	    				oneMonth=(newTime.getFullYear())+"年"+"11月1日";
	    				twoMonth=(newTime.getFullYear())+"年"+"12月1日";
	    				threeMonth=(newTime.getFullYear()+1)+"年"+"1月1日";
    					break;
    				default:
    					oneMonth=(newTime.getFullYear())+"年"+(m+1)+"月1日";
	    				twoMonth=(newTime.getFullYear())+"年"+(m+2)+"月1日";
	    				threeMonth=(newTime.getFullYear())+"年"+(m+3)+"月1日";
    					break;
    			};
    			var baoHtml = '<div class="suiping clearfix">\
					<div class="wbox-close"><img src="http://s1.17house.com/common_h5/redpacket/images/close.png"></div>\
					<div class="suipingBox">\
						<div class="slide-box-shade"></div>\
						<div class="suiping-box-banner"><img class="jz-ok2" src="http://s1.17house.com/newweb/pc/common/images/jz-ok5.png" alt="">\
							<div class="suiping-jt jiantouUp" data-tf="true"><img src="http://s1.17house.com/newweb/pc/common/images/xidi-jantouUP1.png" alt=""></div>\
						</div>\
					</div>\
					<div class="suiping-box">\
						<div class="wbox clearfix">\
							<div class="wbox-form">\
								<h3 class="wbox-form-title">装修计算器<span class="wRoll-title">今日已有<span>0</span>位业主获取了装修预算</span></h3>\
								<form method="post" action="" class="calc-form">\
									<dl class="ipt-line clearfix">\
										<dt>所在城市:<em class="label_start">*</em></dt>\
										<dd class="js-area-btn">\
    				                        <span class="inpIcon cityIcon"></span>\
											<select name="city" class="ipt">\
											</select>\
										</dd>\
									</dl>\
									<dl class="ipt-line mt14 clearfix">\
										<dt>房屋面积:<em class="label_start">*</em></dt>\
										<dd>\
    				                        <span class="inpIcon areaIcon"></span>\
											<input type="text" name="area"  placeholder="输入您的房屋面积" data-value="输入您的房屋面积" autocomplete="off" class="ipt" maxlength="3">\
											<span class="abs-pingmi">㎡</span>\
										</dd>\
									</dl>\
									<dl class="ipt-line mt14 clearfix">\
										<dt>手机号码 :<em class="label_start">*</em></dt>\
										<dd>\
    				                        <span class="inpIcon phoneIcon"></span>\
											<input type="text" name="phone" value="" data-value="输入手机号,报价明细将发送到手机上" autocomplete="off" class="ipt" maxlength="11">\
										</dd>\
									</dl>\
									<dl class="ipt-line mt10 clearfix"><dt></dt>\
										<dd class="error-tip"></dd>\
									</dl>\
								</form>\
							</div>\
							<div class="wbox-btn">\
								<div class="btnbox">\
									<p>开始计算</p>\
								</div>\
							</div>\
							<div class="wbox-result">\
								<div class="res-con">\
									<p class="res-table-title">您的装修预算约为 <span class="f28 fB cOrange" id="base_all">105765</span> 元</p>\
									<div class="res-list">\
										<ul class="res-list-before clearfix">\
											<li class="res-lbj clearfix"><span>主材费：</span><strong id="materialPay"><em>0</em>元</strong></li>\
											<li class="res-lbj clearfix"><span>施工费：</span><strong id="artificialPay"><em>0</em>元</strong></li>\
											<li class="res-rbj clearfix"><span>设计费：</span><strong id="designPay"><em>0</em>元</strong><del>4999元</del></li>\
											<li class="res-rbj clearfix"><span>质检费：</span><strong id="qualityPay"><em>0</em>元</strong><del>2690元</del></li>\
										</ul>\
									</div>\
									<div class="hotad-bjtext">\
										<p class="cOrange"><b>*</b>报价有疑问？稍后装修管家将致电为您解答</p>\
										<p class="cGGray"><b>*</b>该报价为整装全包价格，实际装修报价以量房实测为准</p>\
									</div>\
								</div>\
							</div>\
							<div class="wbox-check">\
								<h3>完善以下信息<span>&nbsp;&nbsp;&nbsp;让我们更了解您的需求优先为您服务</span></h3>\
								<div class="house-type clearfix">\
									<p class="check_question">1.&nbsp;您家的房屋现状是 :</p>\
									<div class="check-house" data-ptag="0">\
										<div class="new-house"></div>\
										<p><i></i>毛坯房</p><input type="hidden" value="毛坯房">\
									</div>\
									<div class="check-house" data-ptag="1">\
										<div class="old-house"></div>\
										<p><i></i>旧房翻新</p><input type="hidden" value="旧房翻新">\
									</div>\
									<div class="check-house check-house-last" data-ptag="2">\
										<div class="little-change"></div>\
										<p><i></i>局部改造</p><input type="hidden" value="局部改造">\
									</div>\
								</div>\
								<div class="decorate-time clearfix">\
									<p class="check_question">2.&nbsp;您家准备什么时候开始装修 :</p>\
									<div class="check-time" data-ptag="1" data-time="'+oneMonth+'">\
										<p><i></i>一个月内</p><input type="hidden" value="1个月内">\
									</div>\
									<div class="check-time check-time-next" data-ptag="2" data-time="'+twoMonth+'">\
										<p><i></i>两个月内</p><input type="hidden" value="2个月内">\
									</div>\
									<div class="check-time check-time-next" data-ptag="3" data-time="'+threeMonth+'">\
										<p><i></i>两个月以上</p><input type="hidden" value="2个月以上">\
									</div>\
								</div>\
								<div class="plot-name clearfix">\
									<p class="check_question">3.&nbsp;您家小区名称 :&nbsp;&nbsp;</p>\
									<input type="text" placeholder="一起装修网将为您推荐优质服务" maxlength="24" style="border-color: rgb(221, 221, 221);">\
								</div>\
								<a href="javascript:void(0);" class="check-upload">提交</a>\
								<div class="complate-form">\
									<p></p>\
								</div>\
							</div>\
						</div>\
					</div>\
				</div>';
				var popSucceed = '<div class="pop-succeed">\
					<div class="pop-succeed-box stepEnd clearfix">\
						<div class="l tender-popac-left ">\
                            <div class="stepEndLeft stepEndItem">\
                                <div class="sucessWarp"><img src="//s1.17house.com/newweb/m/newSem/1138/images/success.png"></div>\
                                <div class="sucessTit">申请成功！</div>\
                                <div class="leftCon">\
	                                <div class="stepEndHint"><span>*</span>15分钟后装修管家将以手机回电，为您提供免费咨询，敬请留意</div>\
	                                <div class="stepEndHint"><span>*</span>一起装修网提供免费量房-0元设计及VR实景方案-免费详细报价服务</div>\
	                            </div>\
	                        </div>\
                        </div>\
						<div class="l tender-popac-right">\
						    <div class="stepEndRight stepEndItem">\
						        <div class="rightCon">\
						            <div class="videoWarp">\
						                <img class="videoPop" src="//s1.17house.com/newweb/m/newSem/1141/images/success/video-img.png">\
						                <video id="myvideo1" controls="" class="video-js vjs-big-play-centered" >\
						                    <source src="//static-default.17house.com/17housevedio/17housevedio.mp4" type="video/mp4">\
						                </video>\
						            </div>\
						            <div class="companyTit">公司介绍</div>\
						            <div class="companyIntro">全国一站式装修服务平台，70%以上的客户来自口碑介绍，中国建筑装饰协会住宅委员会指定最具信赖的装修平台。目前已经在17个城市开设分公司和体验店。2017年2月挂牌新三板。</div>\
						            <div class="inatroList clearfix">\
						                <dl>\
						                    <dt class="tl">2009年</dt>\
						                    <dd class="tl">成立时间</dd>\
						                </dl>\
						                <dl>\
						                    <dt>中国北京</dt>\
						                    <dd>成立地点</dd>\
						                </dl>\
						                <dl>\
						                    <dt>家装服务</dt>\
						                    <dd>主营业务</dd>\
						                </dl>\
						                <dl>\
						                    <dt>120W人</dt>\
						                    <dd>正在访问</dd>\
						                </dl>\
						                <dl class="hideBorder">\
						                    <dt>800W人</dt>\
						                    <dd>累计服务</dd>\
						                </dl>\
						            </div>\
						        </div>\
							</div>\
						</div>\
					</div>\
					<span class="popup-close"></span>\
				</div>';
				$("body").append(baoHtml+popSucceed);
				commonJS.focusBlur($(".suiping-box input[name=area]"));
				commonJS.focusBlur($(".suiping-box input[name=phone]"))
    		},
    		//随机0-20万的数字
    		randomNumber:function(){
	            var self = this;
	            self.randomFun = setInterval(function(){
	                $('#base_all').text(Math.ceil(Math.random()*190000)+10000);
	                $('#materialPay em').text( Math.floor(10000 + Math.random() * (99999-10000+1)));
	                $('#artificialPay em').text( Math.floor(10000 + Math.random() * (99999-10000+1)));
	                $('#designPay em').text(Math.floor(1000 + Math.random() * (10000-1000+1)));
	                $('#qualityPay em').text(Math.floor(500 + Math.random() * (5000-500+1)));
	            },200);   
    		},
    		//获取城市列表
    		bottomCity:function(){
    			function CityData(data){
		    		var html='',cityflag=false;
	        		$.each(data.all, function(i,val) {
	        			var val=val.substring(0,val.length-1);
	        			if(i==data.id){
	        				html+='<option data-id="'+i+'" selected="selected">'+val+'</option>';
	        				cityflag=true;
	        			}else{
	        				html+='<option data-id="'+i+'">'+val+'</option>';
	        			}
	        		});
	        		html+='<option data-id="0">其它</option>';
	        		$(".js-area-btn .ipt").html('').html(html);
	        		if(!cityflag){
	        			$(".js-area-btn .ipt").val("北京");
	        		}
					if(data.id==2){
						$("input[name=square]").val(70);
					    $("input[name=area]").val(70);
					}else if(data.id==800){
						$("input[name=square]").val(50);	
						$("input[name=area]").val(50);
					}else {
						$("input[name=square]").val(90);
						$("input[name=area]").val(90);
					}		        		
	        		
		    	};
    			if(commonJS.CityData){
					CityData(commonJS.CityData);
				}else{
					$.ajax({
				        type: "GET",
				        dataType: 'jsonp',
				        jsonp: 'callback',
				        url: "http://jia.17house.com/iphone/sorthotcity/",
				        timeout: 0,
				        contentType: "application/json;utf-8",
				        success: function(data) {
				        	if(data.err==0){
				        		CityData(data);				        		
				        	}
				        },
				        error:function(data){
				        	console.log(data);
				        }
				    });
				}
    		},
    		jiantouUp:function(){
    			var _this = this;
		        $('.jiantouUp').stop().animate({top:'20px'},500,function(){
		            _this.jiantouUp();    
		        });
			    if ($('.jiantouUp').css('top') == '20px') {
			        $('.jiantouUp').stop().animate({top:'0'},500,function(){
			            _this.jiantouUp();    
			        });
			    };    
			},
    		//随屏展开
    		autoOpen:function(){
    			var _this = this;
		   		$(window).scroll(function(){ 
		   			if(_this.autoOpenIf){
		   				return false;
		   			};
			        _this.now_scr =$(window).scrollTop();
			        if ((_this.now_scr+$(window).height()-_this.slide_height_current) > 0) {
			            if ((parseInt($('.suiping').css('bottom'))+(_this.now_scr - _this.front_scr)) <-360) {
			                _this.front_scr = $(window).scrollTop();
			                $('.suiping').css('bottom','-360px');
			                 $(".suiping-jt").attr({
								'data-tf':"true"
							});	
							_this.jiantouUp();
							$(".suiping-jt").find("img").attr({
								"src":"http://s1.17house.com/newweb/pc/common/images/xidi-jantouUP1.png"
							})
			                return;  
			            }
			            //浮框定位bottom > 0
			            if ((parseInt($('.suiping').css('bottom'))+(_this.now_scr - _this.front_scr)) > 0) {
			                _this.front_scr = $(window).scrollTop();
			                $('.suiping').css('bottom','0');
			               $(".suiping-jt").attr({
								'data-tf':"false"
							});	
							$(".jiantouUp").stop();
							$(".suiping-jt").find("img").attr({				
								"src":"http://s1.17house.com/newweb/pc/common/images/xidi-jantouDown1.png"
							})
			                return;
			            };
			            if (_this.now_scr - _this.front_scr > 0) {
			                $('.suiping').css('bottom',(parseInt($('.suiping').css('bottom'))+(_this.now_scr - _this.front_scr))+'px');
			                _this.front_scr = $(window).scrollTop();                    
			            }else{
			                $('.suiping').css('bottom',(parseInt($('.suiping').css('bottom'))+(_this.now_scr - _this.front_scr))+'px');
			                _this.front_scr = $(window).scrollTop();
			            }
			        }else{            
			            _this.front_scr = $(window).scrollTop();
			            $('.suiping').css('bottom','-360px');
			            $(".suiping-jt").attr({
							'data-tf':"true"
						});
	//					$(".jiantouUp").stop();
						$(".suiping-jt").find("img").attr({
							"src":"http://s1.17house.com/newweb/pc/common/images/xidi-jantouUP1.png"
						})
			            return; 
			        }
			    }); 
	   		},
	   		//click展开 关闭
	   		clickOpen:function(){
	   			var _this = this;
	   			$(".suiping-box-banner").on("click",function(){
					if($(".suiping-jt").attr("data-tf")== "true"){
						$(".suiping").stop(false,true).animate({
							bottom:"0px"
						},400,function(){
							$(".suiping-jt").attr({
								'data-tf':"false"
							});	
							$(".suiping-jt").find("img").attr({				
								"src":"http://s1.17house.com/newweb/pc/common/images/xidi-jantouDown1.png"
							});
							$(".jiantouUp").stop();
							$(".suiping-jt").removeClass("jiantouUp");
							$(".suiping-jt").css({
								top:"10px"
							});
						})
						return false;
					};
					$(".suiping").stop(false,true).animate({
						bottom:"-360px"
					},400,function(){
						_this.autoOpenIf=true;
						$(".suiping-jt").attr({
							'data-tf':"true"
						});
						$(".suiping-jt").find("img").attr({
							"src":"http://s1.17house.com/newweb/pc/common/images/xidi-jantouUP1.png"
						});
						$(".suiping-jt").addClass("jiantouUp");
						 _this.jiantouUp();
						 uup=true;
					});
				});
				$(".wbox-close").on("click",function(){
					$(".suiping").stop(false,true).animate({bottom:"-480px"},400,function(){$(".suiping").height(0).css("overflow","hidden");});
				})
	   		},
	   		//表单提交
	   		formSubmit:function(){
	   			var _this = this;
				$('.suiping-box .btnbox').click(function(){	
					$('.suiping-box .error-tip').html("");
					var _form = $('.suiping-box .calc-form');
					var _phone = _form.find('input[name=phone]');
					var _area = _form.find('input[name=area]');
					var _city = _form.find('select[name=city]');
					if(!commonJS.checkArea(_area,_form.find('.error-tip'))){
						return false;
					};
					if(!commonJS.checkPhone(_phone,_form.find('.error-tip'))){
						return false;
					};	
					
					//三个channel的赋值
					var rFirst=commonJS.getCookie("userMail") || document.referrer,
						rSecond=window.location.href;/*落地页*/
				    var Fsurl = /semzengbin\=/;
				    var XmtUrl=/xmt\=/;
				    var ModelUrl = /model\=/;
				    var cF="站内";
					var cS="pc-bottom";
					var cK="智能报价-底部随屏";	  
			        //判断sem或者新媒体
			        if(Fsurl.test(rSecond)){
			        	cF="sem";
			        }else if(XmtUrl.test(rSecond)){
						cF="新媒体";
						var ArrXmt=commonJS.GetQueryString("xmt")
						var ArrFirst=[["weixin","微信公众号"],["weixin-caidan","公众号菜单"],["weixin-guanggao","公众号广告"],["weixin-guanzhu","公众号关注"],["weixin-fuwu","公众号服务"],["weixin-wangye","公众号网页"],["weibo","微博"],["weibo-caidan","微博菜单"],["weibo-huodong","微博活动"],["weibo-zixun","微博咨询"],["zimeit","自媒体"],["zimeit-lianjie","自媒体链接"],["BD","渠道合作"],["qq","QQ群"],["gerenweixin","个人微信"],["huodong","活动"],["qita","其他"]];
						for(var i=0;i<ArrFirst.length;i++){
						    	if(ArrXmt==ArrFirst[i][0]){
						    	 cS=ArrFirst[i][1]+"-pc";
						    	}
						    }
					}else if(ModelUrl.test(rSecond)){
							cF="app";
							var ArrModel=commonJS.GetQueryString("model")
							cS = ArrModel;
						};
			        var Type = "3";
			        var Name = "匿名";
			        /*新增数据监测*/
			       	var $firsturl=commonJS.getCookie("userMail")|| document.referrer;
					var $secondurl=window.location.href;
					var Fsurl = /semzengbin\=/;
			        var urlreferer = document.referrer || window.location.href;
			        var urlReg = /[a-zA-Z0-9][-a-zA-Z0-9]{0,62}(\.[a-zA-Z0-9][-a-zA-Z0-9]{0,62})+\.?/;
			        var refurl = urlReg.exec(urlreferer);
			        var urldomain = refurl[0];
			        var userinfo=cK+'---一级渠道：'+cF+'---二级渠道：'+cS+'---城市：'+_city.val()+'---手机号码：'+_phone.val()+'---面积：'+_area.val();
			 			userinfo = encodeURIComponent(userinfo);
			        var staturl = 'http://stat.17house.com/stat.js?site=17houseadvert&brower_type=pc&ltype=baoming&stype=智能报价-底部随屏&tag_index=0&tag_name=' + encodeURIComponent('智能报价-底部随屏') + '&urlreferer="' + urlreferer + '"&userinfo="' + userinfo + '"&urldomain="' + urldomain + '"&t=' + new Date().getTime();
			        if(commonJS.getCookie("userMail") || Fsurl.test($secondurl)) {
			           staturl = 'http://stat.17house.com/stat.js?site=pc&housetype=jzsem&houseyewu=baoming&urlreferer=' + $firsturl + '&userinfo=' + userinfo + '&urldomain=' + urldomain + '&t=' + new Date().getTime();
			        };
			        $.getScript(staturl);
			        clearTimeout(_this.randomFun);
			        var $data = {
			        	name:Name, 
			        	mobile:_phone.val(), 
			        	channelFirst:cF,
			        	channelSecond:cS,
			        	channelKey:cK,
			        	cityName:_city.val(),
			        	zxdate:"",
			        	square:_area.val(), 
			        	community:"",
			        	smsType:Type,
			        	referrerFirst:$firsturl,
			        	referrerSecond:$secondurl
			        };
			        window.sessionStorage.setItem("baojiaArr",JSON.stringify($data));
			        var $fn = function(data){			        					
						$('#base_all').html(parseInt(data.data.jianzhuang.total_price));//装修预算
						$('#materialPay em').html(parseInt(data.data.jianzhuang.total_price-data.data.jianzhuang.half_price));//主材费
						$('#artificialPay em').html(parseInt(data.data.jianzhuang.half_price));//施工费
						$('#designPay em').html("0");//设计费
						$('#qualityPay em').html("0");//质检费
						$(".suiping-box .res-rbj del,.suiping-box .hotad-bjtext,.suiping-box .wbox-check").show();
						$(".wbox-form,.wbox-btn").hide();
						_this.succeedSubmit();
			        };
			        commonJS.ajax('http://appapi.17house.com/ZnbjApi.php?action=znbjCalculatorNew&callback=?',$data,$fn);
				});
	   		},
	   		//报名后提交
	   		succeedSubmit:function(){
	   			var houseType = "";
	   			var houseTime = "";
	   			var $data = JSON.parse(window.sessionStorage.getItem("baojiaArr"));
	   			$(".wbox-check .check-house").off().click(function(){
	   				$(this).addClass("on").siblings().removeClass("on");
	   				houseType=$(this).attr("data-ptag");
	   			});
	   			$(".wbox-check .check-time").off().click(function(){
	   				$(this).addClass("on").siblings().removeClass("on");
	   				houseTime=$(this).attr("data-time");
	   			});
	   			$(".wbox-check .check-upload").off().click(function(){
	   				var houseName = $('.wbox-check .plot-name').find("input").val();
	   				if(houseType==""){
	   					$(".complate-form").html("请选择您家的房屋现状").show();
	   					setTimeout(function(){
	   						$(".complate-form").html("").hide();
	   					},1500);
	   					return false;	
	   				};
	   				if(houseTime==""){
	   					$(".complate-form").html("请选择您家的装修时间").show();
	   					setTimeout(function(){
	   						$(".complate-form").html("").hide();
	   					},1500);
	   					return false;	
	   				};
	   				if(houseName==""){
	   					$(".complate-form").html("请输入您家小区名称").show();
	   					setTimeout(function(){
	   						$(".complate-form").html("").hide();
	   					},1500);
	   					return false;	
	   				};
	   				if(houseType==2){
	   					$data.msg="局部改造";
	   					$data.newHouse="";
	   				}else{
	   					$data.newHouse=houseType;
	   				};
	   				$data.zxdate=houseTime;
	   				$data.community=houseName;
	   				$data.smsType=0;
					var $fn = function(data){
						bgColorUp();
	   					$(".pop-succeed").show();
	   					$("html,body").css("overflow-y","hidden");
						$(".pop-succeed .popup-close").off().click(function(){
							bgColorDown();
	   						$(".pop-succeed").hide();
	   						$("html,body").css("overflow-y","scroll");
	   					    var myvideo1 = document.getElementById("myvideo1");
	   					    var myvideo2 = document.getElementById("myvideo2");
	   				 	    var myvideo3 = document.getElementById("myvideo3");
		                    if(myvideo1){
		                    	$(".videoPop").show();
			                    myvideo1.pause();
		                    }
		                    if(myvideo2){
		                    	$(".videoPop").show();
			                    myvideo2.pause();
		                    }
		                    if(myvideo3){
		                    	$(".videoPop").show();
			                    myvideo3.pause();
		                    }
						});
					};
					commonJS.ajax('http://appapi.17house.com/ZnbjApi.php?action=znbjCalculatorNew&callback=?',$data,$fn);
	   			});
	   		},
	   		//初始化
	   		init:function(){
    			this.pushHtml();
    			this.randomNumber();
    			this.bottomCity();
    			this.jiantouUp();
    			this.autoOpenIf=false;
    			this.front_scr = 0;//前一个滚动条距离
			    this.now_scr = 0;//现在的滚动条距离
			    this.slide_height_current = 1500;
    			var followSlide = /\/zixun|\/ask|\/biaoqian/;
    			if(followSlide.test(window.location.href)){this.autoOpen();};
    			this.clickOpen();
    			this.formSubmit();
    			var _syNum=78;
			    (function(){  
			    	// 凌晨0点--23点  每个小时随机增加0-150名报名数
			    	var _hour = new Date().getHours();
			    	if(_hour == 0){
			                _syNum = 78;
			           }else if(_hour > 0 && _hour < 24){
			                _syNum =(_hour*100 + (new Date().getMinutes())*3 );
			            }
			    		$(".suiping-box .wRoll-title").find("span").html(_syNum);
			    	setTimeout(function(){ 
			    		setT();
			    	},3600000);  	
			    	
			    })();
    		}
    	};
    	suipingBox.init();
	
};
	if(!($(".window-box").length)){	
		var url = /lovezhuangxiu/;
		if(!url.test(window.location.href)){
			window_box();
		};
	};	
	var common_tender = function(){
		var common_pop={
			pushHtml:function(){
				var _this = this;
				var newTime = new Date();
    			var m = newTime.getMonth() + 1;
    			var oneMonth="",twoMonth="",threeMonth="";
    			switch (m){
    				case 12:
	    				oneMonth=(newTime.getFullYear()+1)+"年"+"1月1日";
	    				twoMonth=(newTime.getFullYear()+1)+"年"+"2月1日";
	    				threeMonth=(newTime.getFullYear()+1)+"年"+"3月1日";
    					break;
    				case 11:
	    				oneMonth=(newTime.getFullYear())+"年"+"12月1日";
	    				twoMonth=(newTime.getFullYear()+1)+"年"+"1月1日";
	    				threeMonth=(newTime.getFullYear()+1)+"年"+"2月1日";
    					break;
    				case 10:
	    				oneMonth=(newTime.getFullYear())+"年"+"11月1日";
	    				twoMonth=(newTime.getFullYear())+"年"+"12月1日";
	    				threeMonth=(newTime.getFullYear()+1)+"年"+"1月1日";
    					break;
    				default:
    					oneMonth=(newTime.getFullYear())+"年"+(m+1)+"月1日";
	    				twoMonth=(newTime.getFullYear())+"年"+(m+2)+"月1日";
	    				threeMonth=(newTime.getFullYear())+"年"+(m+3)+"月1日";
    					break;
    			};
				var html = '<div class="common-tender-wrapper">\
								<div class="common-tender-popup">\
							    	<ul class="popup-tabs clearfix">\
							      		<li class="active btn-mfbj-list" data-ptag="mfbj"><span class="popup-tabs-item"></span></li>\
							      		<li class="btn-mfsj-list" data-ptag="mfsj"><span class="popup-tabs-item"></span></li>\
							    	</ul>\
							    	<div class="popup-main">\
							      		<div class="popup-mfbj popup-content clearfix stepEnd">\
							        		<p class="error-tip">\
							          			<i class="form-error-icon"></i>\
							          			<span></span>\
							        		</p>\
							        		<div class="popup-content-left mfbj-left-init">\
							          		<h6 class="popup-title">\
							            		<em>免费获取装修报价</em>\
							            		<span class="title-bg-col"></span>\
							          		</h6>\
							          		<div class="popup-mfbj-tip">今天已有<span class="popup-mfbj-tip-num"></span>位业主获取了装修预算</div>\
							          		<form class="popup-form" id="mfbjForm">\
							            		<div class="popup-form-group">\
							              			<div class="popup-form-group-box clearfix">\
							                			<span class="popup-form-label"><span class="popup-form-required">*</span>所在城市</span>\
							                				<select name="city" class="popup-form-control"></select>\
							              				</div>\
							            		</div>\
							            		<div class="popup-form-group">\
							              			<div class="popup-form-group-box clearfix">\
							                			<span class="popup-form-label"><span class="popup-form-required">*</span>房屋面积</span>\
							                			<input autocomplete="off" class="popup-form-control" name="square" placeholder="输入您的房屋面积" data-value="输入您的房屋面积" maxlength="3">\
							                			<em class="popup-form-sup">m²</em></div>\
							            			</div>\
							            		<div class="popup-form-group">\
							              			<div class="popup-form-group-box clearfix">\
							                			<span class="popup-form-label"><span class="popup-form-required">*</span>手机号码</span>\
							                			<input autocomplete="off" class="popup-form-control" name="phone" data-value="输入手机号,报价明细将发送到手机上" maxlength="11">\
							                		</div>\
							            		</div>\
							            		<div class="popup-content-explain">*为了您的权益，您的隐私将被严格保密</div>\
							            	</form>\
							          		<em class="ico-line-top"></em>\
							          		<em class="ico-line-bottom"></em>\
							          		<div class="mfbj-submit-box">\
							            		<a href="javascript:void(0)" id="mfbj-submit-btn" class="mfbj-submit-btn"><span class="mfbj-submit-btn-text">开始计算</span></a>\
							            		<span class="pop-circle-animate"></span>\
							          		</div>\
							       			</div>\
							        		<div class="popup-content-left mfbj-left-result">\
							          			<h6 class="popup-title mfbj-title">\
							            		    <em class="mfbj-title-text">您家的装修预算为：</em>\
							            			<span class="popup-title-count" id="priceTotal">?</span>\
							            			<em class="popup-title-unit">万元</em>\
							            		</h6>\
							          			<div class="mfbj-price-result">\
							            			<div class="mfbj-price-result-detail">\
							              			<ul class="mfbj-price-result-list">\
							                			<li class="mfbj-price-result-item"><span>主材费:</span><strong id="priceMterials"><em>？</em>元</strong></li>\
							                			<li class="mfbj-price-result-item"><span>施工费:</span><strong id="priceArtificial"><em>？</em>元</strong></li>\
							                			<li class="mfbj-price-result-item"><span>设计费:</span><strong id="priceDesign"><em>？</em>元<del class="popup-mfbj-del">4999元</del></strong></li>\
							                			<li class="mfbj-price-result-item"><span>质检费:</span><strong id="priceQuality"><em>？</em>元<del class="popup-mfbj-del">2690元</del></strong></li>\
							              			</ul>\
							            		</div>\
							            		<div class="mfbj-price-footer">\
							              		    <p class="mfbj-price-footer-call">*报价有疑问？稍后装修管家将致电为您解答</p>\
							              			<p>*该报价为整装全包价格，实际装修报价以量房实测为准</p>\
							            		</div>\
							          		</div>\
							          		<em class="check-right-line"></em>\
							        	</div>\
							        	<div class="popup-content-left popup-aftercheck-left">\
							        	    <em class="mfsj-left-lien"></em>\
                                    		<div class="stepEndLeft stepEndItem">\
                                				<div class="sucessWarp"><img src="//s1.17house.com/newweb/m/newSem/1138/images/success.png"></div>\
                                				<div class="sucessTit">申请成功！</div>\
                                				<div class="leftCon">\
	                                				<div class="stepEndHint"><span>*</span>15分钟后装修管家将以手机回电，为您提供免费咨询，敬请留意</div>\
	                                				<div class="stepEndHint"><span>*</span>一起装修网提供免费量房-0元设计及VR实景方案-免费详细报价服务</div>\
	                            				</div>\
	                        				</div>\
							        	</div>\
							        	<div class="popup-content-right mfbj-right-init">\
							          		<h6 class="popup-title mfbj-title"><em class="mfbj-title-text">您家的装修预算为:</em><span class="popup-title-count-right" id="popup-bj-price"></span><em class="popup-title-unit">元</em></h6>\
							          		<div class="mfbj-price-result">\
							            		<div class="mfbj-price-result-detail">\
							              			<ul class="mfbj-price-result-list">\
							                			<li class="mfbj-price-result-item"><span>主材费:</span><strong><em id="pop_materialPay"></em>元</strong></li>\
							                			<li class="mfbj-price-result-item"><span>施工费:</span><strong><em id="pop_artificialPay"></em>元</strong></li>\
							                			<li class="mfbj-price-result-item"><span>设计费:</span><strong><em id="pop_designPay"></em>元</strong></li>\
							                			<li class="mfbj-price-result-item"><span>质检费:</span><strong><em id="pop_qualityPay"></em>元</strong></li>\
							              			</ul>\
							            		</div>\
							          		</div>\
							        	</div>\
							        	<div class="popup-content-right mfbj-right-result">\
							          		<div class="pop-check-info">\
							            		<h3>完善以下信息<span>&nbsp;&nbsp;&nbsp;让我们更了解您的需求优先为您服务</span></h3>\
							            		<div class="house-type clearfix">\
							              		<p class="check_question">1.&nbsp;您家的房屋现状是:</p>\
							              		<div class="check-house" data-ptag="0">\
							                		<div></div>\
							                		<p><i></i>毛坯房</p><input autocomplete="off" type="hidden" value="毛坯房"></div>\
							              		<div class="check-house" data-ptag="1">\
							               		 	<div class="old-house"></div>\
							                		<p><i></i>旧房翻新</p><input autocomplete="off" type="hidden" value="旧房翻新"></div>\
							              		<div class="check-house check-house-last" data-ptag="2">\
							                		<div class="little-change"></div>\
							                		<p><i></i>局部改造</p><input autocomplete="off" type="hidden" value="局部改造"></div>\
							            	</div>\
							            	<div class="decorate-time clearfix">\
							              		<p class="check_question">2.&nbsp;您家准备什么时候开始装修:</p>\
							              		<div class="check-time" data-ptag="'+oneMonth+'">\
							                		<p><i></i>一个月内</p><input autocomplete="off" type="hidden" value="1个月内"></div>\
							              		<div class="check-time check-time-next" data-ptag="'+twoMonth+'">\
							                		<p><i></i>两个月内</p><input autocomplete="off" type="hidden" value="2个月内"></div>\
							              		<div class="check-time check-time-next" data-ptag="'+threeMonth+'">\
							                		<p><i></i>两个月以上</p><input autocomplete="off" type="hidden" value="两个月以上"></div>\
							            	</div>\
							            	<div class="plot-name clearfix">\
							              		<p class="check_question">3.&nbsp;您家小区名称:&nbsp;&nbsp;</p>\
							              		<input autocomplete="off" type="text" data-value="一起装修网为您提供优质施工" maxlength="24"></div>\
							            	<a href="javascript:void(0);" class="check-upload">提交</a>\
							            	<div class="complate-form">\
							              		<p>请选择您家的装修时间</p>\
							            	</div>\
							          	</div>\
							        </div>\
							        <div class="popup-content-right popup-aftercheck-right">\
						    			<div class="stepEndRight stepEndItem">\
						        			<div class="rightCon">\
						            			<div class="videoWarp">\
						                			<img class="videoPop" src="//s1.17house.com/newweb/m/newSem/1141/images/success/video-img.png">\
						                			<video id="myvideo2" controls="" class="video-js vjs-big-play-centered" >\
						                    			<source src="//static-default.17house.com/17housevedio/17housevedio.mp4" type="video/mp4">\
						                			</video>\
						            			</div>\
						            			<div class="companyTit">公司介绍</div>\
						            			<div class="companyIntro">全国一站式装修服务平台，70%以上的客户来自口碑介绍，中国建筑装饰协会住宅委员会指定最具信赖的装修平台。目前已经在17个城市开设分公司和体验店。2017年2月挂牌新三板。</div>\
											    <div class="inatroList clearfix">\
						                			<dl>\
						                    			<dt class="tl">2009年</dt>\
						                    			<dd class="tl">成立时间</dd>\
						                			</dl>\
						                			<dl>\
						                    			<dt>中国北京</dt>\
						                    			<dd>成立地点</dd>\
						                			</dl>\
						                			<dl>\
						                    			<dt>家装服务</dt>\
						                   				<dd>主营业务</dd>\
						                			</dl>\
						                			<dl>\
						                    			<dt>120W人</dt>\
						                    			<dd>正在访问</dd>\
						                			</dl>\
						                			<dl class="hideBorder">\
						                    			<dt>800W人</dt>\
						                    			<dd>累计服务</dd>\
						                			</dl>\
						            			</div>\
						        			</div>\
										</div>\
							      	</div>\
							    </div>\
							      	<div class="popup-mfsj popup-content clearfix">\
							        	<div class="popup-content-left">\
							          		<div class="popup-mfsj-init">\
							            		<h6 class="popup-title">\
							              			<em>我家也要设计成这样</em>\
							              			<span class="title-bg-col"></span>\
							           			</h6>\
							            		<form class="popup-form" id="mfsjForm">\
							              			<p class="error-tip">\
							                			<i class="form-error-icon"></i>\
							                			<span></span>\
							              			</p>\
							              			<div class="popup-form-group">\
							               				<div class="popup-form-group-box clearfix">\
							                  				<span class="popup-form-label">\
							                    				<span class="popup-form-required">*</span>所在城市</span>\
							                  				<select name="city" class="popup-form-control"></select>\
							                			</div>\
							              			</div>\
							              			<div class="popup-form-group">\
							                			<div class="popup-form-group-box clearfix">\
							                  			<span class="popup-form-label">\
							                    			<span class="popup-form-required">*</span>您的称呼</span>\
							                  			<input autocomplete="off" class="popup-form-control" name="chenghu" data-value="请输入您的称呼" maxlength="10"></div>\
							              			</div>\
							              			<div class="popup-form-group">\
							                			<div class="popup-form-group-box clearfix">\
							                  				<span class="popup-form-label">\
							                    				<span class="popup-form-required">*</span>手机号码</span>\
							                  				<input autocomplete="off" class="popup-form-control" name="phone" data-value="填写手机号，抢免费设计名额" maxlength="11"></div>\
							              			</div>\
							              			<a class="popup-mfsj-btn" id="mfsj-submit-btn" href="javascript:void(0)">立即申请</a>\
							              			<div class="popup-content-explain">*为了您的权益，您的隐私将被严格保密</div>\
							              		</form>\
							          		</div>\
							          	<div class="popup-mfsj-result-left">\
							            	<h6 class="popup-mfsj-result-title">申请成功！</h6>\
							           		<div class="popup-mfsj-result-con">\
							              		<p class="popup-mfsj-result-text">您同时还获得<span>1项增值服务</span></p>\
							              		<div class="popup-mfsj-result-mflf"></div>\
							              		<div class="popup-mfsj-result-explain">*稍后装修管家将致电您，为您提供免费装修咨询服务。</div></div>\
							         	</div>\
							          	<em class="mfsj-left-lien"></em>\
							        </div>\
							        <div class="popup-content-right">\
							         	<div class="popup-mfsj-right-init">\
							            	<div class="popup-mfsj-img">\
							              	<em></em>\
							            </div>\
							        </div>\
							        <div class="popup-mfsj-right-result stepEnd">\
						    			<div class="stepEndRight stepEndItem">\
						        			<div class="rightCon">\
						            			<div class="videoWarp">\
						                			<img class="videoPop" src="//s1.17house.com/newweb/m/newSem/1141/images/success/video-img.png">\
						                			<video id="myvideo2" controls="" class="video-js vjs-big-play-centered" >\
						                    			<source src="//static-default.17house.com/17housevedio/17housevedio.mp4" type="video/mp4">\
						                			</video>\
						            			</div>\
						            			<div class="companyTit">公司介绍</div>\
						            			<div class="companyIntro">全国一站式装修服务平台，70%以上的客户来自口碑介绍，中国建筑装饰协会住宅委员会指定最具信赖的装修平台。目前已经在17个城市开设分公司和体验店。2017年2月挂牌新三板。</div>\
											    <div class="inatroList clearfix">\
						                			<dl>\
						                    			<dt class="tl">2009年</dt>\
						                    			<dd class="tl">成立时间</dd>\
						                			</dl>\
						                			<dl>\
						                    			<dt>中国北京</dt>\
						                    			<dd>成立地点</dd>\
						                			</dl>\
						                			<dl>\
						                    			<dt>家装服务</dt>\
						                   				<dd>主营业务</dd>\
						                			</dl>\
						                			<dl>\
						                    			<dt>120W人</dt>\
						                    			<dd>正在访问</dd>\
						                			</dl>\
						                			<dl class="hideBorder">\
						                    			<dt>800W人</dt>\
						                    			<dd>累计服务</dd>\
						                			</dl>\
						            			</div>\
						        			</div>\
										</div>\
							        </div>\
							    </div>\
							</div>\
					</div>\
					<span class="popup-close"></span>\
				</div>';
				$("body").append(html);
				commonJS.focusBlur($("input[name=square].popup-form-control "));
				commonJS.focusBlur($("input[name=phone].popup-form-control "));
				commonJS.focusBlur($("input[name=chenghu].popup-form-control "));
				commonJS.focusBlur($(".plot-name input"));
				$('#mfsj-submit-btn').off().click(function(){
					_this.mfsj();
				});
				$('#mfbj-submit-btn').off().click(function(){
					_this.mfbj();
				});
				$(".common-tender-popup .popup-close").off().click(function(){
					clearTimeout(_this.randomFun);
					$(".common-tender-wrapper").remove();
					$("html,body").css("overflow-y","scroll");
				});
			},
			//随机0-20万的数字
    		randomNumber:function(){
	            var self = this;
	            self.randomFun = setInterval(function(){
	                $('#popup-bj-price').text(Math.ceil(Math.random()*190000)+10000);
	                $('#pop_materialPay').text( Math.floor(10000 + Math.random() * (99999-10000+1)));
	                $('#pop_artificialPay').text( Math.floor(10000 + Math.random() * (99999-10000+1)));
	                $('#pop_designPay').text(Math.floor(1000 + Math.random() * (10000-1000+1)));
	                $('#pop_qualityPay').text(Math.floor(500 + Math.random() * (5000-500+1)));
	            },200);   
    		},
    		//获取城市列表
    		bottomCity:function(){
    			function CityData(data){
		    		var html='',cityflag=false;
	        		$.each(data.all, function(i,val) {
	        			var val=val.substring(0,val.length-1);
	        			if(i==data.id){
	        				html+='<option data-id="'+i+'" selected="selected">'+val+'</option>';
	        				cityflag=true;
	        			}else{
	        				html+='<option data-id="'+i+'">'+val+'</option>';
	        			}
	        		});
	        		html+='<option data-id="0">其它</option>';
	        		$("select[name=city].popup-form-control").html('').html(html);
	        		if(!cityflag){
	        			$("select[name=city].popup-form-control").val("北京");
	        		}
					if(data.id==2){
						$("input[name=square]").val(70);
					    $("input[name=area]").val(70);
					}else if(data.id==800){
						$("input[name=square]").val(50);	
						$("input[name=area]").val(50);
					}else {
						$("input[name=square]").val(90);
						$("input[name=area]").val(90);
					}		        		
	        		
	        		
		    	};
    			if(commonJS.CityData){
					CityData(commonJS.CityData);
				}else{
					$.ajax({
				        type: "GET",
				        dataType: 'jsonp',
				        jsonp: 'callback',
				        url: "http://jia.17house.com/iphone/sorthotcity/",
				        timeout: 0,
				        contentType: "application/json;utf-8",
				        success: function(data) {
				        	if(data.err==0){
				        		CityData(data);			        		
				        	}
				        },
				        error:function(data){
				        	console.log(data);
				        }
				    });
				}
    		},
    		tabs:function(){
    			var _this = this;
    			$(".popup-tabs li").off().click(function(){
    				$(this).addClass("active").siblings().removeClass("active");
    				if($(this).hasClass("btn-mfbj-list")){
    					$('.popup-content').siblings().hide();
    					$('.popup-content.popup-mfbj').show();
//  					$('#mfsj-submit-btn').off().click(function(){
//							_this.mfsj();
//						});
    				}
    				if($(this).hasClass("btn-mfsj-list")){
    					$('.popup-content').siblings().hide();
    					$('.popup-content.popup-mfsj').show();
//  					$('#mfsj-submit-btn').off().click(function(){
//  						_this.mfsj();
//  					});
    				}
    			});
    		},
    		//免费报价
    		mfbj:function(){
    			var _this = this;
				var _form = $('.popup-mfbj');
				var _phone = _form.find('input[name=phone]');
				var _area = _form.find('input[name=square]');
				var _city = _form.find('select[name=city]');
				if(!commonJS.checkArea(_area,_form.find('.error-tip span'))){
					_form.find('.error-tip').show();
					return false;
				};
				if(!commonJS.checkPhone(_phone,_form.find('.error-tip span'))){
					_form.find('.error-tip').show();
					return false;
				};
				_form.find('.error-tip').hide();
				//三个channel的赋值
				var rFirst=commonJS.getCookie("userMail") || document.referrer,
					rSecond=window.location.href;/*落地页*/
			    var Fsurl = /semzengbin\=/;
			    var XmtUrl=/xmt\=/;
			    var ModelUrl = /model\=/;
			    var cF="站内";
				var cS="pc-mini";
				var cK="免费报价";	  
		        //判断sem或者新媒体
		        if(Fsurl.test(rSecond)){
		        	cF="sem";
		        }else if(XmtUrl.test(rSecond)){
					cF="新媒体";
					var ArrXmt=commonJS.GetQueryString("xmt")
					var ArrFirst=[["weixin","微信公众号"],["weixin-caidan","公众号菜单"],["weixin-guanggao","公众号广告"],["weixin-guanzhu","公众号关注"],["weixin-fuwu","公众号服务"],["weixin-wangye","公众号网页"],["weibo","微博"],["weibo-caidan","微博菜单"],["weibo-huodong","微博活动"],["weibo-zixun","微博咨询"],["zimeit","自媒体"],["zimeit-lianjie","自媒体链接"],["BD","渠道合作"],["qq","QQ群"],["gerenweixin","个人微信"],["huodong","活动"],["qita","其他"]];
					for(var i=0;i<ArrFirst.length;i++){
					    	if(ArrXmt==ArrFirst[i][0]){
					    	 cS=ArrFirst[i][1]+"-pc";
					    	}
					    }
				}else if(ModelUrl.test(rSecond)){
						cF="app";
						var ArrModel=commonJS.GetQueryString("model")
						cS = ArrModel;
					};
		        var Type = "1";
		        var Name = "匿名";
		        /*新增数据监测*/
		       	var $firsturl=commonJS.getCookie("userMail")|| document.referrer;
				var $secondurl=window.location.href;
				var Fsurl = /semzengbin\=/;
		        var urlreferer = document.referrer || window.location.href;
		        var urlReg = /[a-zA-Z0-9][-a-zA-Z0-9]{0,62}(\.[a-zA-Z0-9][-a-zA-Z0-9]{0,62})+\.?/;
		        var refurl = urlReg.exec(urlreferer);
		        var urldomain = refurl[0];
		        var userinfo=cK+'---一级渠道：'+cF+'---二级渠道：'+cS+'---城市：'+_city.val()+'---手机号码：'+_phone.val()+'---面积：'+_area.val();
		 			userinfo = encodeURIComponent(userinfo);
		        var staturl = 'http://stat.17house.com/stat.js?site=17houseadvert&brower_type=pc&ltype=baoming&stype='+cK+'&tag_index=0&tag_name=' + encodeURIComponent(cK) + '&urlreferer="' + urlreferer + '"&userinfo="' + userinfo + '"&urldomain="' + urldomain + '"&t=' + new Date().getTime();
		        if(commonJS.getCookie("userMail") || Fsurl.test($secondurl)) {
		           staturl = 'http://stat.17house.com/stat.js?site=pc&housetype=jzsem&houseyewu=baoming&urlreferer=' + $firsturl + '&userinfo=' + userinfo + '&urldomain=' + urldomain + '&t=' + new Date().getTime();
		        };
		        $.getScript(staturl);
		        clearTimeout(_this.randomFun);
		        var $data = {
		        	name:Name, 
		        	mobile:_phone.val(), 
		        	channelFirst:cF,
		        	channelSecond:cS,
		        	channelKey:cK,
		        	cityName:_city.val(),
		        	zxdate:"",
		        	square:_area.val(), 
		        	community:"",
		        	smsType:Type,
		        	referrerFirst:$firsturl,
		        	referrerSecond:$secondurl
		        };
		        window.sessionStorage.setItem("baojiaArr",JSON.stringify($data));
		        var $fn = function(data){	
		        	$(".popup-mfbj .mfbj-left-init,.popup-mfbj .mfbj-right-init").hide();
		        	$(".popup-mfbj .mfbj-left-result,.popup-mfbj .mfbj-right-result").show();
		        	$('#priceTotal').text((data.data.jianzhuang.total_price/10000).toFixed(2));//装修预算
	                $('#priceMterials em').text(parseInt(data.data.jianzhuang.total_price-data.data.jianzhuang.half_price));//主材费
	                $('#priceArtificial em').text(parseInt(data.data.jianzhuang.half_price));//施工费
	                $('#priceDesign em').text("0");
	                $('#priceQuality em').text("0");
					_this.succeedSubmit();
		        };
		        commonJS.ajax('http://appapi.17house.com/ZnbjApi.php?action=znbjCalculatorNew&callback=?',$data,$fn);
			},
			//报名后提交
	   		succeedSubmit:function(){
	   			var houseType = "";
	   			var houseTime = "";
	   			var $data = JSON.parse(window.sessionStorage.getItem("baojiaArr"));
	   			$(".mfbj-right-result .check-house").off().click(function(){
	   				$(this).addClass("on").siblings().removeClass("on");
	   				houseType=$(this).attr("data-ptag");
	   			});
	   			$(".mfbj-right-result .check-time").off().click(function(){
	   				$(this).addClass("on").siblings().removeClass("on");
	   				houseTime=$(this).attr("data-ptag");
	   			});
	   			$(".mfbj-right-result .check-upload").off().click(function(){
	   				var houseName = $('.mfbj-right-result .plot-name').find("input").val();
	   				if(houseType==""){
	   					$(".complate-form").html("请选择您家的房屋现状").show();
	   					setTimeout(function(){
	   						$(".complate-form").html("").hide();
	   					},1500);
	   					return false;	
	   				};
	   				if(houseTime==""){
	   					$(".complate-form").html("请选择您家的装修时间").show();
	   					setTimeout(function(){
	   						$(".complate-form").html("").hide();
	   					},1500);
	   					return false;	
	   				};
	   				if(houseName==""){
	   					$(".complate-form").html("请输入您家小区名称").show();
	   					setTimeout(function(){
	   						$(".complate-form").html("").hide();
	   					},1500);
	   					return false;	
	   				};
	   				if(houseType==2){
	   					$data.msg="局部改造";
	   					$data.newHouse="";
	   				}else{
	   					$data.newHouse=houseType;
	   				};
	   				$data.zxdate=houseTime;
	   				$data.community=houseName;
	   				$data.smsType=0;
					var $fn = function(data){
						$(".popup-mfbj .mfbj-left-result,.popup-mfbj .mfbj-right-result").hide();
						$(".popup-mfbj .popup-aftercheck-left,.popup-mfbj .popup-aftercheck-right").show();
					};
					commonJS.ajax('http://appapi.17house.com/ZnbjApi.php?action=znbjCalculatorNew&callback=?',$data,$fn);
	   			});
	   		},
    		//免费设计
    		mfsj:function(){	
				var _form = $('#mfsjForm');
				var _phone = _form.find('input[name=phone]');
				var _name = _form.find('input[name=chenghu]');
				var _city = _form.find('select[name=city]');
				if(!commonJS.checkName(_name,_form.find('.error-tip span'))){
					_form.find('.error-tip').show();
					return false;
				};
				if(!commonJS.checkPhone(_phone,_form.find('.error-tip span'))){
					_form.find('.error-tip').show();
					return false;
				};
				_form.find('.error-tip').hide();
				//三个channel的赋值
				var rFirst=commonJS.getCookie("userMail") || document.referrer,
					rSecond=window.location.href;/*落地页*/
			    var Fsurl = /semzengbin\=/;
			    var XmtUrl=/xmt\=/;
			    var ModelUrl = /model\=/;
			    var cF="站内";
				var cS="pc-mini";
				var cK="免费设计";	  
		        //判断sem或者新媒体
		        if(Fsurl.test(rSecond)){
		        	cF="sem";
		        }else if(XmtUrl.test(rSecond)){
					cF="新媒体";
					var ArrXmt=commonJS.GetQueryString("xmt")
					var ArrFirst=[["weixin","微信公众号"],["weixin-caidan","公众号菜单"],["weixin-guanggao","公众号广告"],["weixin-guanzhu","公众号关注"],["weixin-fuwu","公众号服务"],["weixin-wangye","公众号网页"],["weibo","微博"],["weibo-caidan","微博菜单"],["weibo-huodong","微博活动"],["weibo-zixun","微博咨询"],["zimeit","自媒体"],["zimeit-lianjie","自媒体链接"],["BD","渠道合作"],["qq","QQ群"],["gerenweixin","个人微信"],["huodong","活动"],["qita","其他"]];
					for(var i=0;i<ArrFirst.length;i++){
					    	if(ArrXmt==ArrFirst[i][0]){
					    	 cS=ArrFirst[i][1]+"-pc";
					    	}
					    }
				}else if(ModelUrl.test(rSecond)){
						cF="app";
						var ArrModel=commonJS.GetQueryString("model")
						cS = ArrModel;
					};
		        var Type = "1";
		        var Name = _name.val();
		        /*新增数据监测*/
		       	var $firsturl=commonJS.getCookie("userMail")|| document.referrer;
				var $secondurl=window.location.href;
				var Fsurl = /semzengbin\=/;
		        var urlreferer = document.referrer || window.location.href;
		        var urlReg = /[a-zA-Z0-9][-a-zA-Z0-9]{0,62}(\.[a-zA-Z0-9][-a-zA-Z0-9]{0,62})+\.?/;
		        var refurl = urlReg.exec(urlreferer);
		        var urldomain = refurl[0];
		        var userinfo=cK+'---一级渠道：'+cF+'---二级渠道：'+cS+'---城市：'+_city.val()+'---手机号码：'+_phone.val();
		 			userinfo = encodeURIComponent(userinfo);
		        var staturl = 'http://stat.17house.com/stat.js?site=17houseadvert&brower_type=pc&ltype=baoming&stype='+cK+'&tag_index=0&tag_name=' + encodeURIComponent(cK) + '&urlreferer="' + urlreferer + '"&userinfo="' + userinfo + '"&urldomain="' + urldomain + '"&t=' + new Date().getTime();
		        if(commonJS.getCookie("userMail") || Fsurl.test($secondurl)) {
		           staturl = 'http://stat.17house.com/stat.js?site=pc&housetype=jzsem&houseyewu=baoming&urlreferer=' + $firsturl + '&userinfo=' + userinfo + '&urldomain=' + urldomain + '&t=' + new Date().getTime();
		        };
		        $.getScript(staturl);
		        var $data = {
		        	name:Name, 
		        	mobile:_phone.val(), 
		        	channelFirst:cF,
		        	channelSecond:cS,
		        	channelKey:cK,
		        	cityName:_city.val(),
		        	zxdate:"",
		        	square:"", 
		        	community:"",
		        	smsType:Type,
		        	referrerFirst:$firsturl,
		        	referrerSecond:$secondurl
		        };
		        var $fn = function(data){			        					
					$(".popup-mfsj .popup-mfsj-init,.popup-mfsj .popup-mfsj-right-init").hide();
					$(".popup-mfsj .popup-mfsj-result-left,.popup-mfsj .popup-mfsj-right-result").show();
		        };
		        commonJS.ajax('http://appapi.17house.com/ZnbjApi.php?action=znbjCalculatorNew&callback=?',$data,$fn);
			},
			//右侧悬浮
			RH:function(){
				var _this = this;
				var html='';
					html += '<div class="RH-box">';
					html += '<ul class="RH">';
					html += '<li class="li-3min"><a target="_blank" href="http://beijing.17house.com/tm/" class="RH-3min">3分钟学装修<img src="http://s1.17house.com/newweb/pc/common/images/RH-3min.png" alt="" /></a></li>'
	//				html += '<li><a rel="nofollow" href="https://17up.tmall.com/?spm=a1z10.3-b-s.w5001-16984637945.4.46f16db0gG8wIY&scene=taobao_shop" class="RH-a0" target="_blank">天猫专卖店</a></li>';
					html += '<li><a href="javascript:void(0);" class="RH-a2">报价计算器</a></li>';
					html += '<li><a href="javascript:void(0);" class="RH-a1">免费设计</a></li>';
					html +='<li><div><a href="javascript:void(0);" class="RH-a3">在线咨询</a><img src="http://s1.17house.com/newweb/pc/common/images/shanshanshan.gif" alt="" /></div></li>';
					html +='<li><a href="javascript:void(0);" class="RH-a5">扫码红包</a></li>';
					html +='<li><a href="javascript:void(0);" class="RH-a4">回到顶部</a></li>'
					html +='</ul>';
					html += '<div class="RH-msg">';
					html += '<img class="RH-wx" src="http://s1.17house.com/common/images/weixin_03.png" />';
					html += '<p class="RH-wx-text">十万精品</br>装修案例领取</p>';
					html += '<img class="RH-xc" src="http://s1.17house.com/newweb/pc/common/images/weXcCode.jpg" alt="二维码" />';
					html += '<p class="RH-xc-text">查看您附近</br>正在装修的工地</p><span></span>';
					html += '</div>';
					html +='</div>';
				$("body").append(html);
				
	        	$.ajax({
			        type: "GET",
			        dataType: 'jsonp',
			        jsonp: 'callback',
			        url: "http://jia.17house.com/iphone/sorthotcity/",
			        timeout: 0,
			        contentType: "application/json;utf-8",
			        success: function(data) {
			        	if(data.err==0){
				        		var CityPy=data.py;
				        		if(!data.py){
				        			CityPy="beijing";			        			
				        		};
				        		var Rh_url ='http://'+CityPy+'.17house.com/tm/';
				        		$(".RH-3min").attr({
				        			"href":Rh_url
				        		});
			        	};
			        }
			    });
	        	$(".RH-a1").off().on("click",function(){
	        		_this.fnbox();
	        		$(".common-tender-wrapper").show();
	        		$(".common-tender-wrapper").find(".popup-mfbj").hide();
	        		$(".common-tender-wrapper").find(".popup-mfsj").show();
	        		$(".common-tender-wrapper").find(".btn-mfbj-list").removeClass("active");
	        		$(".common-tender-wrapper").find(".btn-mfsj-list").addClass("active");
	        		$("html,body").css("overflow","hidden");
				});
				$(".RH-a2").off().on("click",function(){
					_this.fnbox();
					$(".common-tender-wrapper").show();
	        		$(".common-tender-wrapper").find(".popup-mfbj").show();
	        		$(".common-tender-wrapper").find(".popup-mfsj").hide();
	        		$(".common-tender-wrapper").find(".btn-mfbj-list").addClass("active");
	        		$(".common-tender-wrapper").find(".btn-mfsj-list").removeClass("active");
	        		$("html,body").css("overflow","hidden");
				});
				$('.RH-a3,.liBtn,.zixunBtn').off().on('click',function(){
					//openZoosUrl('chatwin','&e=pcyouce');
					window.open("http://q.url.cn/abDkbH?_type=wpa&qidian=true");
				});
				$(".RH-a4").on("click",function(){
					$(window).scrollTop(0);		
				});
				$(".RH-msg").show();
				$(".RH-a5").css({
					background: 'url(http://s1.17house.com/jzhd_pc_sem/images/RH.png) -68px -272px no-repeat #00a151',
					color:'#fff'
				});
	    		setTimeout(function(){
	    			$(".RH-msg").hide();
					$(".RH-a5").css({
						background: 'url(http://s1.17house.com/newweb/pc/common/images/er.gif) center 4px no-repeat',
						color:'#000'
					});
	    		},3000);
	    		$(".RH-a5").hover(function(){
	    			$(".RH-msg").show();
	    			$(".RH-a5").css({
						background: 'url(http://s1.17house.com/jzhd_pc_sem/images/RH.png) -68px -272px no-repeat #00a151',
						color:'#fff'
					});
	    		},function(){
	    			$(".RH-msg").hide();
	    			$(".RH-a5").css({
						background: 'url(http://s1.17house.com/newweb/pc/common/images/er.gif) center 4px no-repeat',
						color:'#000'
					});
	    		});
				
			},
			//方法集体调用
			fnbox:function(){
				this.pushHtml();
				this.bottomCity();
				this.randomNumber();
				this.tabs();
				var _syNum=78;
			    (function(){  
			    	// 凌晨0点--23点  每个小时随机增加0-150名报名数
			    	var _hour = new Date().getHours();
			    	if(_hour == 0){
			                _syNum = 78;
			           }else if(_hour > 0 && _hour < 24){
			                _syNum =(_hour*100 + (new Date().getMinutes())*3 );
			            }
			    		$(".popup-mfbj-tip-num").html(_syNum);
			    	setTimeout(function(){ 
			    		setT();
			    	},3600000);  	
			    	
			    })();
			},
			init:function(){
				this.RH();
			}
		};
		common_pop.init();
	};
	var url = /lovezhuangxiu/;
		if(!url.test(window.location.href)){
			common_tender();;
		};
	
	//返回顶部
	//当前屏幕小于1340时,隐藏右侧悬浮 
	if($(window).width()<1340){
		$(".RH-box").hide();
	};
	$(window).resize(function(){
		var w = $(window).width();
		if(w<1340){
			$(".RH-box").hide();
		}else{
			$(".RH-box").show();
		};
	});

	var rightPosition_box={	       
        init: function(ele1,ele2,GP,GC1){
            var html = ' ';
            var len = GP.length;
            for (var i = 0; i < len; i++) {
                html += '<option value="' + GP[i] + '">' + GP[i] + '</option>';
            };
            ele1.html(html);
            ele1.bind("change", function() {
                var html = '';
                var key = $(this).val();
                var len = GC1[key].length;
                for (var i = 0; i < len; i++) {
                    html += '<option value="' + GC1[key][i] + '">' + GC1[key][i] + '</option>';
                }
                ele2.html(html);
                //$(this).parents('form').find('select[name=User_City]').html(html);
            });

        },
        /*检查姓名*/
        checkName: function(ele, value) {
            var $value = ele.val(),
                $parent = ele.parent();
            if (!$value || $value == value) {
               	$parent.find('.TK_errortips').html('请填写姓名');
                $(".TK_name").focus();
                return false;
            }
            return true;
        },
        /*检查面积*/
        checkArea: function(ele, value) {
            var $value = ele.val(),
                $parent = ele.parent();
            if (!$value || $value == value) {
               	$parent.find('.TK_errortips').html('请填写面积');
                ele.focus();
                return false;
            }
             var regTest = /[0-9]$/;
            if (!regTest.test($value)) {
                $parent.find('.TK_errortips').html('建筑面积: 请填写数字');
                ele.focus();
                return false;
            }
            var regTest = /^(?:[0-9]{1,3}|1000)$/;
			if(!regTest.test($value)){
				$parent.find('.TK_errortips').html('房屋面积需为小于1000的数字');
				ele.focus();
				return false;
			}
            return true;
        },
         /*检查手机号*/
        checkPhone: function(mobile) {
            var mobileNum,$parent;
            $parent = mobile.parent();
            mobileNum = mobile.val();
            if (mobile.val() == '' || mobile.val() == mobile.attr('data-value')) {
               	$parent.find('.TK_errortips').html('请填写手机号');
                $(".TK_phone").focus();
                return false;
            }
            var regTest =commonJS.phoneRegular;
            if (!regTest.test(mobile.val())) {
                $parent.find('.TK_errortips').html('电话格式不对，请检查');
                $(".TK_phone").focus();
                return false;
            }
            return true;
        },
       	/*检查手机号2*/
        checkPhoneNum: function(mobile) {
            var mobileNum,$parent;
            $parent = mobile.parent();
            mobileNum = mobile.val();
            if (mobile.val() == '' || mobile.val() == mobile.attr('data-value')) {
               	$parent.find('.TK_errortips').html('请填写手机号');
                $("TK_sheji_phone").focus();
                return false;
            }
            var regTest = commonJS.phoneRegular;
            if (!regTest.test(mobile.val())) {
                $parent.find('.TK_errortips').html('电话格式不对，请检查');
                $("TK_sheji_phone").focus();
                return false;
            }
            return true;
        },
        /*验证城市*/
        checkCity: function(User_City){
        	var $parent=User_City.parent().parent();
            if (User_City.html() == '' || User_City.html() == '选择您房屋所在城市') {
                $parent.find('.TK_errortips').html('请选择城市');
                return false;
            }
            return true;
        },

		//渲染报价弹窗
		baojia:function(){
		  	function CityData(data){
		  		var box='';
				box+='<!--PC报价start-->';
				box+='<div class="TK_pop_baojia">';
	  			box+='<p class="TK_pop_close"><img src="http://s1.17house.com/tuku/baoming_new/images/tuku_close.png" alt="关闭"></p>';
	  			box+='<p class="TK_pop_title">我家装修得花多少钱？</p>';
	  			box+='<form action="" method="post" name="" id="" class="TK_yusuan">';
				box+='<!--<input type="text" class="TK_input TK_name" data-value="您的称呼" value="您的称呼" maxlength="8">-->';
				var _City=data.city.substring(0,data.city.length-1);
				box+='<div class="city"><span class="l cityS">'+_City+'</span> <i class="r"></i><ul class="cityList clearfix" style="display: none;">';
				var cityflag=false;
				$.each(data.all,function(i,val){
					if(i==data.id){
						box+='<li data-id="'+i+'" class="active" ><a href="javascript:;">'+val.substring(0,val.length-1)+'</a></li>';
						cityflag=true;
					}else{
						box+='<li data-id="'+i+'"><a href="javascript:;">'+val.substring(0,val.length-1)+'</a></li>';
					}
				});
				box+='<li data-id="0"><a href="javascript:;">其它</a></li>';
	            box+='</ul></div>';	
				box+='<input type="text" class="TK_input TK_area" data-value="请输入建筑面积" value="请输入建筑面积" maxlength="8">';
				box+='<em class="TK_m2">m<i>2</i></em>';
				box+='<input type="text" class="TK_input1 TK_phone" data-value="输入手机号，获取报价结果" value="输入手机号，获取报价结果"  maxlength="11">';
				box+='<p class="TK_errortips"></p>';
				box+='<input type="button" class="TK_btn" value="开始计算">';
	  			box+='</form>';
	  			box+='<p class="TK_attention"><img src="http://s1.17house.com/tuku/baoming_new/images/tuku-attention.png" alt="注意事项"><span>您的隐私将严格保密，请放心填写!</span></p>';
			  	box+='</div>';
			  	box+='<!--PC报价end-->';
			  	box+='<!--PC报价成功start-->';
			  	box+='<div class="TK_yusuan_jie">';
	      		box+='<p class="TK_pop_close"><img src="http://s1.17house.com/tuku/baoming_new/images/tuku_close.png" alt="关闭" data-bd-imgshare-binded="1"></p>';
				box+='<p class="TK_pop_title">我家装修得花多少钱？</p>';
				box+='<div class="TK_jie_zonge">';
				box+='<span class="TK_jie_zonge_sp">全部预算约 <i class="half-total">0</i> 万元</span>';
				box+='</div>';
				box+='<div class="TK_jie_table">';
				box+='<p class="TK_tt">';
				box+='<span class="TK_tt_sp1">卧室总价：</span><span class="TK_tt_sp2"><i class="zhuwo">0</i> 元</span>';
				box+='</p>';
				box+='<p class="TK_tt">';
				box+='<span class="TK_tt_sp1">餐厅总价：</span><span class="TK_tt_sp2"><i class="keting">0</i> 元</span>';
				box+='</p>';
				box+='<p class="TK_tt">';
				box+='<span class="TK_tt_sp1">厨房总价：</span><span class="TK_tt_sp2"><i class="chufang">0</i> 元</span>';
				box+='</p>';
				box+='<p class="TK_tt">';
				box+='<span class="TK_tt_sp1">卫生间总价：</span><span class="TK_tt_sp2"><i class="weishengjian">0</i> 元</span>';
				box+='</p>';
				box+='<p class="TK_tt">';
				box+='<span class="TK_tt_sp1">阳台总价：</span><span class="TK_tt_sp2"><i class="yangtai">0</i> 元</span>';
				box+='</p>';
				box+='<p class="TK_tt">';
				box+='<span class="TK_tt_sp1">其他预算：</span><span class="TK_tt_sp2"><i class="qita">0</i> 元</span>';
				box+='</p>';
				box+='</div>';
				box+='<p class="TK_jie_attention">温馨提示：</p>';
				box+='<p class="TK_jie_attentionson">*施工预算价格为毛坯房半包估计价格（不含水电报价）</p>';
				box+='<p class="TK_jie_attentionson">*全部预算价格为毛坯房+主材（不含水电报价）</p>';
				box+='<p class="TK_jie_attentionson">*稍候装修管家将致电您，为您提供免费装修咨询服务</p>';
		        box+='</div>';
		        box+='<!--PC报价成功end-->';
				$("body").append(box);
				if(!cityflag){
					function CityCheck(els){
						els.removeClass("active");
						for(var i=0;i<els.length;i++){
							if(els.eq(i).attr("data-id")==2){
								els.eq(i).addClass("active");
								break;
							}
						}
					}
					CityCheck($(".TK_pop_baojia form .city .cityList").children("li"));
					$(".TK_pop_baojia form .city .cityS").html("北京");
				}
				$(".TK_pop_baojia .city").on("click",function(){
					$(this).find(".cityList").show();
				});
				//	$(".TK_pop_baojia .city span").html(commonJS.city());
				$(".TK_pop_baojia .city").find(".cityList").find("li").on("click",function(e){
					var evt = e ? e:window.event;
						evt.stopPropagation();
					$(".TK_pop_baojia .city").find(".cityList").find("li").removeClass("active");
					$(this).addClass("active");
					$(".TK_pop_baojia .city").find("span").html($(this).find("a").html())
					$(".TK_pop_baojia .city").find(".cityList").hide();			
				});
				$(".TK_pop_baojia").on("mouseleave",function(){
					$(".TK_pop_baojia .city").find(".cityList").hide();	
				});
				rightPosition_box.TK_close();
//				rightPosition_box.TK_baojia();
				rightPosition_box.popBaojia();
				commonJS.focusBlur($('.TK_pop_baojia .TK_area'), '请输入建筑面积');
				commonJS.focusBlur($('.TK_pop_baojia .TK_phone'), '输入手机号，获取报价结果');
			}
			if(commonJS.CityData){
				CityData(commonJS.CityData);
			}else{
				$.ajax({
			        type: "GET",
			        dataType: 'jsonp',
			        jsonp: 'callback',
			        url: "http://jia.17house.com/iphone/sorthotcity/",
			        timeout: 0,
			        contentType: "application/json;utf-8",
			        success: function(data) {
			        	if(data.err==0){
			        		CityData(data);
							if(data.id==2){
								$("input[name=square]").val(70);
							    $("input[name=area]").val(70);
							}else if(data.id==800){
								$("input[name=square]").val(50);	
								$("input[name=area]").val(50);
							}else {
								$("input[name=square]").val(90);
								$("input[name=area]").val(90);
							}			        		
			        		
			        	}
			        },
			        error:function(data){
			        	console.log(data);
			        }
			    });
			}
		},
		//渲染设计
		sheji:function(){
			function CityData(data){
				var html = '<div class="TK_pop_sheji">';
				html +='<p class="TK_pop_close"><img src="http://s1.17house.com/tuku/baoming_new/images/tuku_close.png" alt="关闭"></p>';
				html +='<p class="TK_pop_title">免费户型设计</p>';
				var _City=data.city.substring(0,data.city.length-1);
				html+='<div class="city"><span class="l cityS">'+_City+'</span> <i class="r"></i><ul class="cityList clearfix" style="display: none;">';
				var cityflag=false;
				$.each(data.all,function(i,val){
					if(i==data.id){
						html+='<li data-id="'+i+'" class="active" ><a href="javascript:;">'+val.substring(0,val.length-1)+'</a></li>';
						cityflag=true;
					}else{
						html+='<li data-id="'+i+'"><a href="javascript:;">'+val.substring(0,val.length-1)+'</a></li>';
					}
				});
				html+='<li data-id="0"><a href="javascript:;">其它</a></li>';
	            html+='</ul></div>';	
				html +='<input type="text" data-value="输入手机号，获取3套免费设计方案" value="输入手机号，获取3套免费设计方案" class="TK_sheji_inp TK_sheji_phone" maxlength="11">';
				html +='<p class="TK_errortips"></p>';
				html +='<input type="button" value="免费预约" class="TK_sheji_btn" id="TK_sheji_btn">';
				html +='<p class="TK_sheji_attention">我们承诺：一起装修网提供该项免费服务，绝不产生任何费用！</p>';
				html +='</div>';
				$("body").append(html);
				if(!cityflag){
					function CityCheck(els){
						els.removeClass("active");
						for(var i=0;i<els.length;i++){
							if(els.eq(i).attr("data-id")==2){
								els.eq(i).addClass("active");
								break;
							}
						}
					}
					CityCheck($(".TK_pop_sheji .city .cityList").children("li"));
					$(".TK_pop_sheji .city .cityS").html("北京");
				}
				$(".TK_pop_sheji .city").on("click",function(){
					$(this).find(".cityList").show();
				});
				//	$(".TK_pop_sheji .city span").html(commonJS.city());
				$(".TK_pop_sheji .city").find(".cityList").find("li").on("click",function(e){
					var evt = e ? e:window.event;
						evt.stopPropagation();
					$(".TK_pop_sheji .city").find(".cityList").find("li").removeClass("active");
					$(this).addClass("active");
					$(".TK_pop_sheji .city").find("span").html($(this).find("a").html())
					$(".TK_pop_sheji .city").find(".cityList").hide();			
				});
				$(".TK_pop_sheji").on("mouseleave",function(){
					$(".TK_pop_sheji .city").find(".cityList").hide();	
				});
				rightPosition_box.TK_close();
				rightPosition_box.signUp_sheji();
//				rightPosition_box.TK_sheji();
				commonJS.focusBlur($('.TK_pop_sheji .TK_sheji_phone'), '输入手机号，获取3套免费设计方案');
			}
			if(commonJS.CityData){
				CityData(commonJS.CityData);
			}else{
				$.ajax({
			        type: "GET",
			        dataType: 'jsonp',
			        jsonp: 'callback',
			        url: "http://jia.17house.com/iphone/sorthotcity/",
			        timeout: 0,
			        contentType: "application/json;utf-8",
			        success: function(data) {
			        	if(data.err==0){
			        		CityData(data);
							if(data.id==2){
								$("input[name=square]").val(70);
							    $("input[name=area]").val(70);
							}else if(data.id==800){
								$("input[name=square]").val(50);	
								$("input[name=area]").val(50);
							}else {
								$("input[name=square]").val(90);
								$("input[name=area]").val(90);
							}			        		
			        		
			        	}
			        },
			        error:function(data){
			        	console.log(data);
			        }
			    });
			}
		},
		TK_sheji:function(){
			$(".RH-a1").off().on("click",function(){
				$(".TK_pop_sheji").show();
				bgColorUp();
			});
		},
		TK_baojia:function(){
			$(".RH-a2").off().on("click",function(){
				$(".TK_pop_baojia").show();
				bgColorUp();
			});
		},
		TK_close:function(){
			$(".TK_pop_close,.TK_shejisucc_close").off().on("click",function(){
				$(this).parent().hide();
				bgColorDown();
			});
		},
		//设计报名
        signUp_sheji: function() {        	
          	var _this = this,
              	bAjax = true;
         		$("#TK_sheji_btn").off().on('click', function() {
		            var $parent = $(this).closest('div');
		            var $tel = $parent.find($(".TK_sheji_phone"));
                	var User_City = $parent.find('.city .cityS');
		           	bAjax = false;
		           	//向新增成功框隐藏域里面赋值start
					$(".TK_succ_div").find(".TK_phone").val($tel.val());
					$(".TK_succ_div").find(".TK_city").val(User_City.html());
					//告诉成功框要使用哪个title
					$(".TK_succ_div").find(".TitleName").val("设计");
					//向新增成功框隐藏域里面赋值end
					//三个channel的赋值
					var $firsturl=commonJS.getCookie("userMail") || document.referrer;
					var $secondurl=window.location.href;
				    var Fsurl = /semzengbin\=/;
				    var XmtUrl=/xmt\=/;
					//三个channel的赋值
					var cF="站内";
					var cS="pc-mini";
					var cK="免费设计";   
                    var Name="匿名";
                    var Type="1"; 
                    $(".TK_succ_div").find(".TK_name").val(Name);
					$(".TK_succ_div").find(".TK_channelFirst").val(cF);
					$(".TK_succ_div").find(".TK_channelSecond").val(cS);
					$(".TK_succ_div").find(".TK_channelKey").val(cK);
					$(".TK_succ_div").find(".TK_smstype").val(Type);
					//向新增成功框隐藏域里面赋值end
					//城市验证
                    if (!_this.checkCity(User_City)) {
                        return false;
                    }
                    //手机号验证
		            if (!_this.checkPhoneNum($tel)) {
		                return false;
		            }
		            if (bAjax) {
		                alert('报名中,请稍后');
		                return;
		            }
		        //判断sem或者新媒体
                var XmtUrl=/xmt\=/;
                var ModelUrl = /model\=/
	            if(Fsurl.test($secondurl)){
	            	cF="SEM";
	            }else if(XmtUrl.test($secondurl)){
					cF="新媒体";
					var ArrXmt=commonJS.GetQueryString("xmt");
					var ArrFirst=[["weixin","微信公众号"],["weixin-caidan","公众号菜单"],["weixin-guanggao","公众号广告"],["weixin-guanzhu","公众号关注"],["weixin-fuwu","公众号服务"],["weixin-wangye","公众号网页"],["weibo","微博"],["weibo-caidan","微博菜单"],["weibo-huodong","微博活动"],["weibo-zixun","微博咨询"],["zimeit","自媒体"],["zimeit-lianjie","自媒体链接"],["BD","渠道合作"],["qq","QQ群"],["gerenweixin","个人微信"],["huodong","活动"],["qita","其他"]];
					for(var i=0;i<ArrFirst.length;i++){
				    	if(ArrXmt==ArrFirst[i][0]){
				    		cS=ArrFirst[i][1]+"-PC";
				    	}
				    }
				}else if(ModelUrl.test($secondurl)){
					cF="app";
					var ArrModel=commonJS.GetQueryString("model");
					cS = ArrModel;
				};    
     		 	/*数据监控    start */
				var urlreferer=document.referrer||$secondurl;					
				var urlReg = /[a-zA-Z0-9][-a-zA-Z0-9]{0,62}(\.[a-zA-Z0-9][-a-zA-Z0-9]{0,62})+\.?/;
				var refurl=urlReg.exec(urlreferer);
				var urldomain=refurl[0];
				var userinfo="关键字："+cK+"-----一级渠道："+cF+"----二级渠道："+cS+"----姓名："+Name+"----电话："+$tel.val();  //这里需要拼上用户填写报名的手机和用户名
				userinfo=encodeURIComponent(userinfo);
				var staturl='http://stat.17house.com/stat.js?site=17houseadvert&brower_type=pc&ltype=baoming&stype=taocan&tag_index=0&tag_name='+encodeURIComponent(cK)+'&phone='+$tel.val()+'&urlreferer='+urlreferer+'&userinfo='+userinfo+'&urldomain='+urldomain+'&t='+new Date().getTime();
				if(commonJS.getCookie("userMail") || Fsurl.test(urlreferer)){
					staturl='http://stat.17house.com/stat.js?site=pc&housetype=jzsem&houseyewu=baoming&urlreferer='+urlreferer+'&userinfo='+userinfo+'&urldomain='+urldomain+'&t='+new Date().getTime();
				};
				$.get(staturl);

	              	$.post('http://appapi.17house.com/ZnbjApi.php?action=znbjCalculatorNew&callback=?', {
                        name:Name,
                    	mobile:$tel.val(),
                    	channelFirst:cF,
                    	channelSecond:cS,
                    	channelKey:cK,
                    	cityName:User_City.html(),
                    	zxdate:"",
                    	square:"", 
                    	community:"",
                    	smsType:Type,
                    	referrerFirst:$firsturl,
                    	referrerSecond:$secondurl
                    }, function(data) {
                        var error = data.error;
                        if (error == 0) {
                          	$(".TK_pop_sheji").hide();
                          	bgColorDown();
							//新增成功报名框
							$(".TK_succ_div").show();
							$(".TK_succ_smtitle").hide();
							$(".smtitle_sheji").show();
							 bgColorUp();
                        } else if(error == 5) {
                        	$(".TK_pop_sheji").hide();
                        	bgColorDown();
							//新增重复框
							$(".TK_afteragain").show();
							 bgColorUp();
                        }
                    }, 'json');
	          	});
     	 	},
     	 	//报价计算
     	 	popBaojia:function(){        	
            /**
           · 逻辑关系：左右侧，各走各的流程。
            1、左侧按钮: 装修报价
           · 第一步：填写手机号、省、市
           · 第二步：成功后把数据填入预算框中
            **/
            $(".TK_btn").click(function(event) {
                var _this = $('.TK_yusuan');
                event.preventDefault(); //阻止表单提交事件
                _this.find('.TK_errortips').html('');
                //表单验证
                var square = _this.find('.TK_area');
                var phone = _this.find('.TK_phone');                
                var User_City = _this.find('.city .cityS');
                var keyword = $('#kword').attr('data-keyword');
				//cookie拿落地页
				var $firsturl=commonJS.getCookie("userMail") || document.referrer;
				var $secondurl=window.location.href;
				var Fsurl = /semzengbin\=/;
				//三个channel的赋值
				var cF="站内";
				var cS="pc-mini";
				var cK="免费报价";
				var Name="匿名";
                var Type="1";  
		        //判断sem或者新媒体
                var XmtUrl=/xmt\=/;
                var ModelUrl = /model\=/
	            if(Fsurl.test($secondurl)){
	            	cF="SEM";
	            }else if(XmtUrl.test($secondurl)){
					cF="新媒体";
					var ArrXmt=commonJS.GetQueryString("xmt");
					var ArrFirst=[["weixin","微信公众号"],["weixin-caidan","公众号菜单"],["weixin-guanggao","公众号广告"],["weixin-guanzhu","公众号关注"],["weixin-fuwu","公众号服务"],["weixin-wangye","公众号网页"],["weibo","微博"],["weibo-caidan","微博菜单"],["weibo-huodong","微博活动"],["weibo-zixun","微博咨询"],["zimeit","自媒体"],["zimeit-lianjie","自媒体链接"],["BD","渠道合作"],["qq","QQ群"],["gerenweixin","个人微信"],["huodong","活动"],["qita","其他"]];
					for(var i=0;i<ArrFirst.length;i++){
				    	if(ArrXmt==ArrFirst[i][0]){
				    		cS=ArrFirst[i][1]+"-PC";
				    	}
				    }
				}else if(ModelUrl.test($secondurl)){
					cF="app";
					var ArrModel=commonJS.GetQueryString("model");
					cS = ArrModel;
				};
                //城市验证
                if (!rightPosition_box.checkCity(User_City)) {
                    return false;
                }
                //面积验证
                if (!rightPosition_box.checkArea(square, '建筑面积')) {
                    return false;
                }
                //手机号验证
                if (!rightPosition_box.checkPhone(phone)) {
		            return false;
		        }
                /*新增数据监测*/			 	
	            var urlreferer=document.referrer||$secondurl;					
				var urlReg = /[a-zA-Z0-9][-a-zA-Z0-9]{0,62}(\.[a-zA-Z0-9][-a-zA-Z0-9]{0,62})+\.?/;
				var refurl=urlReg.exec(urlreferer);
				var urldomain=refurl[0];
				var userinfo="关键字："+cK+"-----一级渠道："+cF+"----二级渠道："+cS+"----姓名："+Name+"----电话："+phone.val();  //这里需要拼上用户填写报名的手机和用户名
				userinfo=encodeURIComponent(userinfo);
				var staturl='http://stat.17house.com/stat.js?site=17houseadvert&brower_type=pc&ltype=baoming&stype=taocan&tag_index=0&tag_name='+encodeURIComponent(cK)+'&phone='+phone.val()+'&urlreferer='+urlreferer+'&userinfo='+userinfo+'&urldomain='+urldomain+'&t='+new Date().getTime();
				if(commonJS.getCookie("userMail") || Fsurl.test(urlreferer)){
					staturl='http://stat.17house.com/stat.js?site=pc&housetype=jzsem&houseyewu=baoming&urlreferer='+urlreferer+'&userinfo='+userinfo+'&urldomain='+urldomain+'&t='+new Date().getTime();
				}
				$.get(staturl);
				/*新增报名检测end*/
                //提交信息
                $.post('http://appapi.17house.com/ZnbjApi.php?action=znbjCalculatorNew&callback=?', {
                    name:Name,
                	mobile:phone.val(),
                	channelFirst:cF,
                	channelSecond:cS,
                	channelKey:cK,
                	cityName:User_City.html(),
                	zxdate:"",
                	square:square.val(), 
                	community:"",
                	smsType:Type,
                	referrerFirst:$firsturl,
                	referrerSecond:$secondurl
                }, function(data) {
                    var error = data.error;
                        //填入数据
                        $('.TK_pop_baojia').hide();
                        $('.TK_yusuan_jie').show();
                        $('.TK_yusuan_jie .half-total').html((data.data.jianzhuang.total_price/10000).toFixed(2));
                        $('.all-total').html(data.data.jianzhuang.total_price);
                        $('.zhuwo').html(data.data.jianzhuang.zhuwo.price+data.data.jianzhuang.ciwo.price);
                        $('.keting').html(data.data.jianzhuang.keting.price);
                        $('.chufang').html(data.data.jianzhuang.chufang.price);
                        $('.weishengjian').html(data.data.jianzhuang.weishengjian.price);
                        $('.yangtai').html(data.data.jianzhuang.yangtai.price);
                        $('.qita').html(data.data.jianzhuang.qita.price);

                }, 'json');
            });
        }
		
	};
	rightPosition_box.sheji();
//	rightPosition_box.RH();
	rightPosition_box.baojia();
	
	/************** 底部随屏，视频 部分修改 （input聚焦变色，视频播放） *****************/	
	$(document).on("click",".videoPop",function(){
		$(this).hide();
		this.nextElementSibling.play();
	})
	$(document).on("focus","select,input",function(){
		$(this).css("border-color","rgb(194,240,218)");
	})
	$(document).on("blur","select,input",function(){
		$(this).css("border-color","#ececec");
	})    	

	$(document).on("focus","input[name=area],input[name=square]",function(){
		$(this).val("");
		$(this).attr("placeholder","")
	}) 	
	
	$(document).on("blur","input[name=area],input[name=square]",function(){
		$(this).attr("placeholder","请输入您的房屋面积")
	}) 		
	
});	
/***********************智能报价-底部随屏 2016-12-29****************/	

var poplogin =function(id,name){
		$("#YuFrame1Bg").hide();
		$("#YuFrame1").hide();
		userData(name);
		
		console.log(id+"------"+name);
	};
	
	//2018-10-10 哈尔滨活动
	$(function() {
		var webUrl = window.location.href;
		var party = {
			cut_off_timestamp: (new Date(2018, 9, 13, 24, 0, 0)).getTime(), //截止日期2018-10-13
			start_timestamp: (new Date(2018, 9, 13, 24, 0, 0)).getTime(), //开始时间
			init: function() {
				var _this = this;
				var _date = new Date();
				var setStop = null;
				today_timestamp = _date.getTime();
				if(today_timestamp <= _this.cut_off_timestamp) {
					var party_data = {
						party: 1,
						time: new Date().getTime()
					}
					_this.partyHtml();
					
					var get_party_data = JSON.parse(sessionStorage.getItem("party"));

					if(!get_party_data || get_party_data.party == 1) {
						//console.log("活动开始")
						var start = sessionStorage.setItem('party', JSON.stringify(party_data));
						$(".party_warp").show();

					}
					if(get_party_data && get_party_data.party == 0) { //点击活动关闭按钮再次进入页面
						setStop = setInterval(function() {
							p()
						}, 100);
					}

					$(".party_close").click(function() {
						$(".party_warp").hide();
						sessionStorage.setItem('party', JSON.stringify({
							party: 0,
							time: new Date().getTime()
						}));
						setStop = setInterval(function() {
							p()
						}, 100);
					})
					
					$(".gift_img").on("click", function() {
						$(".party_warp").hide();
						
						sessionStorage.setItem('party', JSON.stringify({
							party: 0,
							time: new Date().getTime()
						}));
						setStop = setInterval(function() {
							p()
						}, 100);					
						
						
						window.open('http://m.beijing.17house.com/action/?id=95&xmt=huodong&xmtkey=tanchuang-pc');
					})				
				}

				function p() {
					var get_party_data = JSON.parse(sessionStorage.getItem("party"));
					var againParty = (new Date()).getTime() - (Number(get_party_data.time) + (1000 * 60 * 60));
					if(againParty >= 0) {
						//console.log("重新启动");
						$(".party_warp").show();
						clearInterval(setStop);
					} else {
						//console.log("倒计时:" + (againParty / 1000))
						$(".party_warp").hide();
					}
				}
			},
			partyHtml: function() {
				var html = '<div class="party_warp" style="display:none;">' +
					'<div class="party_layer">'+
					  '<div class="party_gift">' +
					      '<img class="gift_img" src="http://s1.17house.com/newweb/pc/party/gift.png" />' +
					      '<div class="party_close">' +
					         '<img src="http://s1.17house.com/newweb/pc/party/close.png"  />' +
					      '</div>' +
					   '</div>' +  
					'</div>' +
					'</div>' +
					'</div>';
				$("body").append(html);
				var newImg  = new Image();
				newImg.src = 'http://s1.17house.com/newweb/pc/party/gift.png';
				newImg.onload = function(){
					var height = this.height,width = this.width,partyGiftWidth = $(window).width()*0.25;
					partyGiftHeight = partyGiftWidth*(height/width);
					$(".gift_img").height(partyGiftHeight);
					$(".party_gift").css({
						'width':partyGiftWidth,
						'height':partyGiftHeight,
						'margin-left':-(partyGiftWidth/2)+'px',
						'margin-top':-(partyGiftHeight/2)+'px',
					});
				}

			},
			timeInit: function() {
				var time = new Date(),
					y = time.getFullYear(),
					m = time.getMonth() + 1,
					d = time.getDate(),
					h = time.getHours(),
					mm = time.getMinutes(),
					s = time.getSeconds();
				return {
					y: y,
					m: m,
					d: d,
					h: h,
					mm: mm,
					s: s
				};
			}
		}
		if(webUrl == 'http://haerbin.17house.com/' || webUrl == 'https://haerbin.17house.com/' ||  webUrl == 'http://m.haerbin.17house.com/'||  webUrl == 'https://m.haerbin.17house.com/'){
			party.init();
		}else{
		var stopActive = setInterval(function() {
			if(party.cut_off_timestamp == (new Date()).getTime()) {
				$(".party_warp").remove();
				clearInterval(stopActive);
			}
		}, 100)
		}
	})
	
	